[Bug libstdc++/82254] std::is_nothrow_invocable_r is broken

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Sep 20 14:23:00 GMT 2017


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82254

--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Author: redi
Date: Wed Sep 20 14:22:25 2017
New Revision: 253014

URL: https://gcc.gnu.org/viewcvs?rev=253014&root=gcc&view=rev
Log:
PR libstdc++/82254 fix std::is_nothrow_invocable_r w.r.t throwing conversions

        PR libstdc++/82254
        * include/std/type_traits (__is_invocable): Add partial specialization
        for INVOKE<void> case and remove is_void<R> check from partial
        specialization for INVOKE<R> case.
        (__is_nt_invocable_impl): New helper for is_nothrow_invocable_r.
        (is_nothrow_invocable_r): Use __is_nt_invocable_impl.
        * testsuite/20_util/is_nothrow_invocable/value.cc: Add tests for
        conversions that can throw or fail to convert. Use static assert
        strings to explain negative results.
        * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Use
        is_nothrow_constructible in is_nt_invocable_conv.

Modified:
    branches/gcc-7-branch/libstdc++-v3/ChangeLog
    branches/gcc-7-branch/libstdc++-v3/include/std/type_traits
   
branches/gcc-7-branch/libstdc++-v3/testsuite/20_util/is_nothrow_invocable/value.cc
   
branches/gcc-7-branch/libstdc++-v3/testsuite/20_util/is_nothrow_invocable/value_ext.cc


More information about the Gcc-bugs mailing list