]> git.ipfire.org Git - thirdparty/gcc.git/commit
PR libstdc++/91371 make std::is_function handle other calling conventions
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 20 Aug 2019 21:21:15 +0000 (21:21 +0000)
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 20 Aug 2019 21:21:15 +0000 (21:21 +0000)
commit5151e40eb4380b55612c89efe64724811ef2b423
treebba28d22e9f22b7aae5f3c05b6f90681faa83426
parent16ac1e7c117ddae72603054cf52a4eb5a5485d20
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@274756 138bc75d-0d04-0410-961f-82ee72b054a4
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]