| 8 | #include <vector> |
| 9 | |
| 10 | int main() |
| 11 | { |
| 12 | struct Book { |
| 13 | std::string title; |
| 14 | std::string isbn; |
| 15 | }; |
| 16 | |
| 17 | std::vector<Book> books{ |
| 18 | {"Functional Programming in C++", "978-3-20-148410-0"}, |
| 19 | {"Effective C++", "978-3-16-148410-0"}}; |
| 20 | |
| 21 | std::ranges::sort(books, {}, &Book::title); |
| 22 | |
| 23 | for(const auto& book : books) { std::cout << book.title << '\n'; } |
| 24 | } |
nothing calls this directly
no outgoing calls
no test coverage detected