Larry Evans schrieb:
The code in the 1st attachment fails to compile as shown in 2nd attachment. If that's intended, the what's the justification for not allowing appending to an empty sequence? If that's not intended, then should I file a bug report?
Based on:
/html/fusion/algorithm/transformation/functions/push_back.html it seems push_back should work on a 'Forward Sequence' and based on:
/html/fusion/container/list.html list is a 'Forward Sequence'. And based on the following quote from the Synopsis of the list.html:
The variadic class interface accepts 0 to FUSION_MAX_LIST_SIZE elements
an empty list type, i.e. list<>, is a list, the attached code should compile.
The problem boils down to fusion::push_back having a const-qualified
sequence argument, whereas fusion::result_of::push_back passes its
sequence argument right through to the fusion::joint_view .
The documentation is misleading in this regard as the declaration of
fusion::push_back in algorithm.qbk does not pass the const to
fusion::result_of::push_back either. The actual code does so of course.
typedef result_of::push_back