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 order to make code even more easily readable, I started encapsulating the creation of a "transform" range adaptor that accesses a member variable:
inline constexpr auto fetch = [](auto memberPtr) { return boost::adaptors::transformed(std::bind(memberPtr, std::placeholders::_1)); }; // example sort(c | fetch(&Object::name));
This solves the boiler-plate code required otherwise:
sort(c | transformed(std::bind(&Object::name, std::placeholders::_1)));
Do you think this is a generic enough pattern worthwhile to be added to "boost range"?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
In order to make code even more easily readable, I started encapsulating the creation of a "transform" range adaptor that accesses a member variable:
This solves the boiler-plate code required otherwise:
Do you think this is a generic enough pattern worthwhile to be added to "boost range"?
The text was updated successfully, but these errors were encountered: