| 45 | #endif |
| 46 | |
| 47 | int main() |
| 48 | { |
| 49 | #if(__cpp_generic_lambdas >= 201707) |
| 50 | const Book effectiveCpp{"Effective C++", "978-3-16-148410-0"}; |
| 51 | const Book fpCpp{"Functional Programming in C++", |
| 52 | "978-3-20-148410-0"}; |
| 53 | |
| 54 | const Magazine ix{"iX", "978-3-16-148410-0"}; |
| 55 | const Magazine overload{"overload", "978-3-20-148410-0"}; |
| 56 | |
| 57 | const Price normal{34.95}; |
| 58 | const Price reduced{24.95}; |
| 59 | |
| 60 | MapSortedByIsbn<Book, Price> book2Price{ |
| 61 | {effectiveCpp, reduced}, {fpCpp, normal}}; |
| 62 | MapSortedByIsbn<Magazine, Price> magazine2Price{ |
| 63 | {ix, reduced}, {overload, normal}}; |
| 64 | |
| 65 | for(const auto& [k, v] : book2Price) { |
| 66 | printf( |
| 67 | "%s %s %f\n", k.title.c_str(), k.isbn.c_str(), v.amount); |
| 68 | } |
| 69 | |
| 70 | #else |
| 71 | # pragma message("not supported") |
| 72 | #endif |
| 73 | } |
nothing calls this directly
no outgoing calls
no test coverage detected