We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In my own class called Node, I wrote
using value_type = std::unique_ptr<AbstractPrintItem>; using const_iterator = std::vector<std::unique_ptr<AbstractPrintItem>>::const_iterator; const_iterator begin() const { return m_printItems.begin(); } const_iterator end() const { return m_printItems.end(); }
This works fine for range-for, and STL algorithms. But kdalgorithms::min_element failed to build with
kdalgorithms.h:214:19: error: ‘const class Node’ has no member named ‘empty’ 214 | if (container.empty())
Shouldn't this be a begin()==end() test instead?
The text was updated successfully, but these errors were encountered:
Ensure min/max_value works without .empty() on container
b4f0a78
Fixes issue #51
4e8530b
No branches or pull requests
In my own class called Node, I wrote
This works fine for range-for, and STL algorithms.
But kdalgorithms::min_element failed to build with
Shouldn't this be a begin()==end() test instead?
The text was updated successfully, but these errors were encountered: