|
Boost : |
Subject: Re: [boost] Metaprogramming: parameter pack expansion/evaluation trick
From: Paul Fultz II (pfultz2_at_[hidden])
Date: 2015-07-03 13:42:16
> > But unfortunately there's no way to force the compiler to evaluate
> > expressions in constructor call from left to right. So it did not work
> on
> > GCC (but work on Clang).
> >
> « []
>
> There is. Just use {} and it's guaranteed to evaluate the args from left
> to
> right.
Also, just as a note, the Fit library has `apply_eval` that will evaluate
the
arguments in order from left to right, even on compilers that don't
guarantee
the order of {} yet:
http://fit.readthedocs.org/en/latest/apply_eval/index.html
Paul
-- View this message in context: http://boost.2283326.n4.nabble.com/Metaprogramming-parameter-pack-expansion-evaluation-trick-tp4677758p4677775.html Sent from the Boost - Dev mailing list archive at Nabble.com.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk