
18 Mar
2017
18 Mar
'17
1:55 p.m.
Bjorn Reese wrote:
On 03/18/2017 02:33 PM, Peter Dimov via Boost wrote:
Bjorn Reese wrote:
Most algorithms take the typelist as the first argument, but others do not, e.g. mp_transform<F, L...>. If possible, I would like to see all algorithms take typelist as the first argument.
It's not possible for L... to be first. Note the ellipsis.
Notice that I removed them :)
The documentation states that "data structures are lists of the form L<T...>" so why is L... needed in mp_transform?
mp_transform is variadic, it works on more than one list. mp_transform<std::pair, mp_list<int, float>, mp_list<char, double>> -> mp_list<std::pair<int, char>, std::pair<float, double>>