r270964 - in /branches/gcc-8-branch/libstdc++-v...

redi@gcc.gnu.org redi@gcc.gnu.org
Tue May 7 15:46:00 GMT 2019


Author: redi
Date: Tue May  7 15:46:21 2019
New Revision: 270964

URL: https://gcc.gnu.org/viewcvs?rev=270964&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.

Backport from mainline
2019-04-17  Jonathan Wakely  <jwakely@redhat.com>

	* 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:
    branches/gcc-8-branch/libstdc++-v3/ChangeLog
    branches/gcc-8-branch/libstdc++-v3/include/std/optional
    branches/gcc-8-branch/libstdc++-v3/testsuite/20_util/optional/constexpr/observers/4.cc
    branches/gcc-8-branch/libstdc++-v3/testsuite/20_util/optional/observers/4.cc



More information about the Libstdc++-cvs mailing list