]> git.ipfire.org Git - thirdparty/gcc.git/commit - libstdc++-v3/include/std/type_traits
PR libstdc++/91371 make std::is_function handle other calling conventions
authorJonathan Wakely <jwakely@redhat.com>
Tue, 20 Aug 2019 21:21:15 +0000 (22:21 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Tue, 20 Aug 2019 21:21:15 +0000 (22:21 +0100)
commit72459cfd86389ead7ce0cdd09a3d272684105874
treebba28d22e9f22b7aae5f3c05b6f90681faa83426
parent43055d2379cfb1b5b1b09e243a9829e52e12b60a
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.

From-SVN: r274756
libstdc++-v3/ChangeLog
libstdc++-v3/include/std/type_traits
libstdc++-v3/testsuite/20_util/bind/91371.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/is_function/91371.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/is_function/value.cc
libstdc++-v3/testsuite/20_util/is_member_function_pointer/91371.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/is_object/91371.cc [new file with mode: 0644]