This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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] Define std::is_callable and std::is_nothrow_callable


Two new traits for C++17, as well as identical __is__callable and
__is_nothrow_callable traits defined for C++11 mode (so I can use the
latter to add an exception specification to std::__invoke).

	* doc/xml/manual/status_cxx2017.xml: Update status table.
	* include/std/functional (__inv_unwrap): Move to <type_traits>.
	(__invoke_impl): Remove exception specifications.
	(__invoke, invoke): Add exception specifications using
	__is_nothrow_callable.
	* include/std/type_traits (__inv_unwrap): Move from <functional>.
	(__is_callable_impl, __call_is_nt, __call_is_nothrow): New helpers.
	(__is_callable, __is_nothrow_callable): New traits.
	(is_callable, is_callable_v): New C++17 traits.
	(is_nothrow_callable, is_nothrow_callable_v): Likewise.
	* testsuite/20_util/is_callable/requirements/
	explicit_instantiation.cc: New test.
	* testsuite/20_util/is_callable/requirements/
	explicit_instantiation_ext.cc: New test.
	* testsuite/20_util/is_callable/requirements/typedefs.cc: New test.
	* testsuite/20_util/is_callable/requirements/typedefs_ext.cc: New
	test.
	* testsuite/20_util/is_callable/value.cc: New test.
	* testsuite/20_util/is_callable/value_ext.cc: New test.
	* testsuite/20_util/is_nothrow_callable/requirements/
	explicit_instantiation.cc: New test.
	* testsuite/20_util/is_nothrow_callable/requirements/
	explicit_instantiation_ext.cc: New test.
	* testsuite/20_util/is_nothrow_callable/requirements/typedefs.cc:
	New test.
	* testsuite/20_util/is_nothrow_callable/requirements/typedefs_ext.cc:
	New test.
	* testsuite/20_util/is_nothrow_callable/value.cc: New test.
	* testsuite/20_util/is_nothrow_callable/value_ext.cc: New test.

Tested x86_64-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]