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

--- Comment #8 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Author: redi
Date: Tue Aug 20 21:21:15 2019
New Revision: 274756

URL: https://gcc.gnu.org/viewcvs?rev=274756&root=gcc&view=rev
Log:
PR libstdc++/91371 make std::is_function handle other calling conventions

The x86 attributes such as ms_abi, stdcall, fastcall etc. alter the
function type, which means that functions with one of those attributes
do not match any of the partial specializations of std::is_function.

Rather than duplicating the list for every calling convention, use a
much simpler definition of std::is_function.

Also redefine __is_referenceable to not rely on partial specializations
for each type of referenceable function.

        PR libstdc++/91371
        * include/std/type_traits (is_function): Simplify definition. Remove
        partial specializations for function types.
        (__is_referenceable): Simplify definition.
        * testsuite/20_util/bind/91371.cc: New test.
        * testsuite/20_util/is_function/91371.cc: New test.
        * testsuite/20_util/is_function/value.cc: Check more pointer types.
        * testsuite/20_util/is_member_function_pointer/91371.cc: New test.
        * testsuite/20_util/is_object/91371.cc: New test.

Added:
    trunk/libstdc++-v3/testsuite/20_util/bind/91371.cc
    trunk/libstdc++-v3/testsuite/20_util/is_function/91371.cc
    trunk/libstdc++-v3/testsuite/20_util/is_member_function_pointer/91371.cc
    trunk/libstdc++-v3/testsuite/20_util/is_object/91371.cc
Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/include/std/type_traits
    trunk/libstdc++-v3/testsuite/20_util/is_function/value.cc

Reply via email to