|
Boost : |
From: herve martin (hervemart1_at_[hidden])
Date: 2021-11-28 19:55:22
Hi,
When working with view of boost::fusion I feel something frustrated
because of the limited set of possible constructors.
Indeed, apart from copy constructor, views usually only provide
constructors taken l-value reference on sequence as input. I would like to
extend the constructors set of views with some new ones which would also
accept r-value references on view as input.
This would allow some fancy combination at construction time as for example:
vector <https://www.boost.org/doc/libs/1_77_0/libs/fusion/doc/html/fusion/container/vector.html><bool>
v0(true);vector
<https://www.boost.org/doc/libs/1_77_0/libs/fusion/doc/html/fusion/container/vector.html><int,
char> v1(3, 'x');vector
<https://www.boost.org/doc/libs/1_77_0/libs/fusion/doc/html/fusion/container/vector.html><std::string,
int> v2("hello", 123);
using view1 = joint_view<
vector <https://www.boost.org/doc/libs/1_77_0/libs/fusion/doc/html/fusion/container/vector.html><int,
char>
, vector <https://www.boost.org/doc/libs/1_77_0/libs/fusion/doc/html/fusion/container/vector.html><std::string,
int>>;using view = joint_view< vector
<https://www.boost.org/doc/libs/1_77_0/libs/fusion/doc/html/fusion/container/vector.html><bool>
, view1>;
view aview = view(v0, view1(v1, v2));std::cout << aview << std::endl;
I would be glad to contribute to the boost library by updating the
boost::fusion views with some new constructors bu I'm not familiar with
development in boost.
What would be the next step to give a chance to my proposal to integrate
boost ?
Best regards,
Herve
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk