This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/87016] std::optional::operator= in constexpr context


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?

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]