This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/87016] std::optional::operator= in constexpr context
- From: "bobogu at atlas dot cz" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 20 Aug 2018 12:38:33 +0000
- Subject: [Bug c++/87016] std::optional::operator= in constexpr context
- Auto-submitted: auto-generated
- References: <bug-87016-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87016
--- Comment #2 from bobogu at atlas dot cz ---
Do I understand it correctly that this will get optimized into one statement
saying
bar = std::optional<int>(10);
If so, is there something that could prevent such optimizations in order to
check if the code is portable?
Also, just to clarify, this has nothing to do with this proposal
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0602r3.html to which
someone has pointed me to?