r270409 - in /trunk/libstdc++-v3: ChangeLog inc...

redi@gcc.gnu.org redi@gcc.gnu.org
Wed Apr 17 13:13:00 GMT 2019


Author: redi
Date: Wed Apr 17 13:13:30 2019
New Revision: 270409

URL: https://gcc.gnu.org/viewcvs?rev=270409&root=gcc&view=rev
Log:
Add constexpr to std::optional::value_or(U&&)&&

In C++1z drafts up to N4606 the constexpr keyword was missing from the
detailed description of this function, despite being shown in the class
synopsis.  That was fixed editorially for N4618, but our implementation
was not corrected to match.

	* include/std/optional (optional::value_or(U&&) &&): Add missing
	constexpr specifier.
	* testsuite/20_util/optional/constexpr/observers/4.cc: Check value_or
	for disengaged optionals and rvalue optionals.
	* testsuite/20_util/optional/observers/4.cc: Likewise.

Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/include/std/optional
    trunk/libstdc++-v3/testsuite/20_util/optional/constexpr/observers/4.cc
    trunk/libstdc++-v3/testsuite/20_util/optional/observers/4.cc



More information about the Libstdc++-cvs mailing list