This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/51253] [C++11][DR 1030] Evaluation order (sequenced-before relation) among initializer-clauses in braced-init-list
- From: "akim.demaille at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 04 Jun 2014 06:22:59 +0000
- Subject: [Bug c++/51253] [C++11][DR 1030] Evaluation order (sequenced-before relation) among initializer-clauses in braced-init-list
- Auto-submitted: auto-generated
- References: <bug-51253-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51253
--- Comment #15 from Akim Demaille <akim.demaille at gmail dot com> ---
(In reply to Jonathan Wakely from comment #13)
> (In reply to Akim Demaille from comment #10)
> > auto t = std::make_tuple(incr(), incr());
>
> That's not an initializer-list, it's a function call, so the order of
> evaluation is not specified and that example is not relevant AFAICT.
Yes, you are right, I had also realized that afterwards. It would be
nice though if the standard could ensure that perfect forwarding could
preserve the guarantee on left-to-right "upward": convenience functions,
that wrap constructors for instance, could still be used safely.