This is the mail archive of the gcc-patches@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]

[PATCH] P0758R1 Implicit conversion traits


Extend __is_convertible_helper to also detect whether the conversion is
non-throwing, for std::is_nothrow_convertible in C++2a,

	* include/std/type_traits [__cplusplus > 201703]
	(__is_convertible_helper::__is_nothrow_type): Define new member.
	(__is_convertible_helper<_From, _To, false>::__test_aux1): Add
	noexcept.
	(__is_convertible_helper<_From, _To, false>::__test_nothrow)
	(__is_convertible_helper<_From, _To, false>::__is_nothrow_type): Add
	new members.
	(is_nothrow_convertible, is_nothrow_convertible_v): Define for C++2a.
	* testsuite/20_util/is_nothrow_convertible/value.cc: New.
	* testsuite/20_util/is_nothrow_convertible/requirements/
	explicit_instantiation.cc: New.
	* testsuite/20_util/is_nothrow_convertible/requirements/typedefs.cc:
	New.

Tested powerpc64le-linux, committed to trunk.


Attachment: patch.txt
Description: Text document


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