Right, a full and comprehensive explanation. Many Thanks. Kind Regards Rob. On 17 April 2018 at 12:17, Michel Morin via Boost-users < boost-users@lists.boost.org> wrote:
Robert Jones via Boost-users wrote:
for( int i : { 1, 2, 3 } | reversed ) { cout << i << " "; } // Bad
Boost.Range is not relevant here (other than the prvalue problem). `{...} | ...` is not allowed in C++. See https://bugs.llvm.org/show_bug.cgi?id=13069
In C++2a, you can use this
for (auto rng = {...}; auto&& x : rng | ...) {...}
thanks to http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/ p0614r1.html.
Regards, Michel _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org https://lists.boost.org/mailman/listinfo.cgi/boost-users