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
Let's say i have the following code:
struct vertex { transform::position_2d pos{transform::position_2d::scalar(0.f)}; transform::position_2d texture_pos{transform::position_2d::scalar(0.f)}; graphics::color pixel_color{graphics::white}; }; struct vertex_array { std::vector<vertex> vertices; vertex_geometry_type geometry_type; }; // logic code for (auto &v : array_cmp.vertices) v.pixel_color = clr_winner;
What i would like to achieve with pipes is smth like:
struct vertex { transform::position_2d pos{transform::position_2d::scalar(0.f)}; transform::position_2d texture_pos{transform::position_2d::scalar(0.f)}; graphics::color pixel_color{graphics::white}; }; struct vertex_array { std::vector<vertex> vertices; vertex_geometry_type geometry_type; }; //logic code array_cmp.vertices >>= pipes::member(&geometry::vertex::pixel_color) >>= pipes::fill(clr_winner) >>= pipes::override(array_cmp.vertices); // or array_cmp.vertices >>= pipes::fill(&geometry::vertex::pixel_color, clr_winner) >>= pipes::override(array_cmp.vertices);
Do you think it's will be possible to achieve ?
The text was updated successfully, but these errors were encountered:
The equivalent in range is: ranges::fill(views::transform(array_cmp.vertices, &geometry::vertex::pixel_color), clr_winner);
ranges::fill(views::transform(array_cmp.vertices, &geometry::vertex::pixel_color), clr_winner);
i hope range v3 will allow us to do: ranges::fill(array_cmp.vertices, &geometry::vertex::pixel_color, clr_winner)
ranges::fill(array_cmp.vertices, &geometry::vertex::pixel_color, clr_winner)
Little remark about the pipe library: is great but for me the big problem is unfortunately ADL:
We cannot write: std::cout << endl; so we cannot write pipes::functionality() >>= another_functionality() which will be so much cleaner to read/write.
std::cout << endl;
pipes::functionality() >>= another_functionality()
Sorry, something went wrong.
No branches or pull requests
Let's say i have the following code:
What i would like to achieve with pipes is smth like:
Do you think it's will be possible to achieve ?
The text was updated successfully, but these errors were encountered: