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

ville@gcc.gnu.org ville@gcc.gnu.org
Wed Jul 13 11:25:00 GMT 2016


Author: ville
Date: Wed Jul 13 11:25:51 2016
New Revision: 238292

URL: https://gcc.gnu.org/viewcvs?rev=238292&root=gcc&view=rev
Log:
	Implement P0307R2, Making Optional Greater Equal Again.
	* include/experimental/optional (_Has_addressof): Fix the comment.
	* include/std/optional (_Has_addressof): Likewise.
	(operator=(_Up&&)): Constrain.
	(operator=(const optional<_Up>&)): Likewise.
	(operator=(optional<_Up>&&)): Likewise.
	(__optional_relop_t): New.
	(operator==(const optional<_Tp>&, const optional<_Tp>&)): Constrain.
	(operator!=(const optional<_Tp>&, const optional<_Tp>&)):
	Constrain and make transparent.
	(operator<(const optional<_Tp>&, const optional<_Tp>&)): Constrain.
	(operator>(const optional<_Tp>&, const optional<_Tp>&)):
	Constrain and make transparent.
	(operator<=(const optional<_Tp>&, const optional<_Tp>&)): Likewise.
	(operator>=(const optional<_Tp>&, const optional<_Tp>&)): Likewise.
	(operator==(const optional<_Tp>&, const _Tp&): Constrain.
	(operator==(const _Tp&, const optional<_Tp>&)): Likewise.
	(operator!=(const optional<_Tp>&, _Tp const&)):
	Constrain and make transparent.
	(operator!=(const _Tp&, const optional<_Tp>&)): Likewise.
	(operator<(const optional<_Tp>&, const _Tp&)): Constrain.
	(operator<(const _Tp&, const optional<_Tp>&)): Likewise.
	(operator>(const optional<_Tp>&, const _Tp&)):
	Constrain and make transparent.
	(operator>(const _Tp&, const optional<_Tp>&)): Likewise.
	(operator<=(const optional<_Tp>&, const _Tp&)): Likewise.
	(operator<=(const _Tp&, const optional<_Tp>&)): Likewise.
	(operator>=(const optional<_Tp>&, const _Tp&)): Likewise.
	(operator>=(const _Tp&, const optional<_Tp>&)): Likewise.
	* testsuite/20_util/optional/constexpr/relops/2.cc: Adjust.
	* testsuite/20_util/optional/constexpr/relops/4.cc: Likewise.
	* testsuite/20_util/optional/relops/1.cc: Likewise.
	* testsuite/20_util/optional/relops/2.cc: Likewise.
	* testsuite/20_util/optional/relops/3.cc: Likewise.
	* testsuite/20_util/optional/relops/4.cc: Likewise.
	* testsuite/20_util/optional/requirements.cc: Add tests to verify
	that optional's relops are transparent and don't synthesize
	operators. Also test that assignment sfinaes.

Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/include/experimental/optional
    trunk/libstdc++-v3/include/std/optional
    trunk/libstdc++-v3/testsuite/20_util/optional/constexpr/relops/2.cc
    trunk/libstdc++-v3/testsuite/20_util/optional/constexpr/relops/4.cc
    trunk/libstdc++-v3/testsuite/20_util/optional/relops/1.cc
    trunk/libstdc++-v3/testsuite/20_util/optional/relops/2.cc
    trunk/libstdc++-v3/testsuite/20_util/optional/relops/3.cc
    trunk/libstdc++-v3/testsuite/20_util/optional/relops/4.cc
    trunk/libstdc++-v3/testsuite/20_util/optional/requirements.cc



More information about the Libstdc++-cvs mailing list