Add 'is_callable' and 'is_nothrow_callable' traits and cleanup INVOKE.
authorEric Fiselier <eric@efcs.ca>
Wed, 20 Apr 2016 00:14:32 +0000 (00:14 +0000)
committerEric Fiselier <eric@efcs.ca>
Wed, 20 Apr 2016 00:14:32 +0000 (00:14 +0000)
commit840fa745ca493123c44d7e9b62676f3a0cd23c0d
tree48f0ece836408898936fa627512b5422a3e562b2
parent3eef9d180dbc9458f96f3e0f6a79fdee56bb8aae
Add 'is_callable' and 'is_nothrow_callable' traits and cleanup INVOKE.

The primary purpose of this patch is to add the 'is_callable' traits.
Since 'is_nothrow_callable' required making 'INVOKE' conditionally noexcept
I also took this oppertunity to implement a constexpr version of INVOKE.
This fixes 'std::experimental::apply' which required constexpr 'INVOKE support'.

This patch will be followed up with some cleanup. Primarly removing most
of "__member_function_traits" since it's no longer used by INVOKE (in C++11 at least).

llvm-svn: 266836
15 files changed:
libcxx/include/__functional_base
libcxx/include/experimental/tuple
libcxx/include/type_traits
libcxx/test/std/experimental/utilities/tuple/tuple.apply/constexpr_types.pass.cpp
libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/PR23141_invoke_not_constexpr.pass.cpp [new file with mode: 0644]
libcxx/test/std/utilities/function.objects/func.require/bullet_1_2_3.pass.cpp
libcxx/test/std/utilities/function.objects/func.require/bullet_4_5_6.pass.cpp
libcxx/test/std/utilities/function.objects/func.require/invoke_helpers.h
libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/allocate_shared.pass.cpp
libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/allocate_shared_cxx03.pass.cpp [moved from libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/allocate_shared_no_variadics.pass.cpp with 98% similarity]
libcxx/test/std/utilities/meta/meta.rel/is_callable.pass.cpp [new file with mode: 0644]
libcxx/test/std/utilities/meta/meta.rel/is_nothrow_callable.pass.cpp [new file with mode: 0644]
libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/result_of.pass.cpp
libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/result_of11.pass.cpp
libcxx/www/cxx1z_status.html