P0758R1 Implicit conversion traits
authorJonathan Wakely <jwakely@redhat.com>
Mon, 2 Jul 2018 22:09:25 +0000 (23:09 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Mon, 2 Jul 2018 22:09:25 +0000 (23:09 +0100)
commit8df27fcb9168fe26a6bcd34f4e653e1585895354
treeb28afa0e0becf9af2fcb5fbaa355958c39549d58
parenta5eae716f66322842da21c17002c66b10c6f6b40
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.

From-SVN: r262322
libstdc++-v3/ChangeLog
libstdc++-v3/include/std/type_traits
libstdc++-v3/testsuite/20_util/is_nothrow_convertible/requirements/explicit_instantiation.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/is_nothrow_convertible/requirements/typedefs.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/is_nothrow_convertible/value.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs_neg.cc
libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc