[PATCH] Simplify reference_wrapper nested typedefs

Jonathan Wakely jwakely@redhat.com
Fri Oct 14 09:12:00 GMT 2016


More <functional> refactoring. This uses the void_t "detection idiom"
to test for the members, with fewer templates and fewer lines of code.

There are now no more uses of _GLIBCXX_HAS_NESTED_TYPE, so we could
consider removing it from <type_traits>. I find it more
straightforward to use void_t directly.

	* include/std/functional (_Reference_wrapper_base_impl): Remove.
	(_Refwrap_base_arg1, _Refwrap_base_arg2): New helpers using __void_t.
	(_Reference_wrapper_base): Inherit from new helpers.

Tested powerpc64le-linux, committed to trunk.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.txt
Type: text/x-patch
Size: 3364 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20161014/87a83334/attachment.bin>


More information about the Libstdc++ mailing list