Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

std::ranges::sort error in file Cpp-High-Performance-Second-Edition-master/Chapter09/example_projections.cpp #9

Open
zephyrus-repos opened this issue Jun 19, 2023 · 1 comment

Comments

@zephyrus-repos
Copy link

When compiling the code, I received the following error :
....../Cpp-High-Performance-Second-Edition-master/Chapter09/example_projections.cpp:65:16: error: ‘sort’ is not a member of ‘std::ranges’; did you mean ‘std::sort’?
65 | std::ranges::sort(players, std::less{}, [](const Player& p) {
| ^~~~

To eliminate this error, I add the header file in the source file located at: ....../Cpp-High-Performance-Second-Edition-master/Chapter09/example_projections.cpp.

@zephyrus-repos
Copy link
Author

Several other similar errors can also be solved by adding the header file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant