diff options
Diffstat (limited to 'libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.isbind')
2 files changed, 41 insertions, 0 deletions
diff --git a/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.isbind/is_bind_expression.pass.cpp b/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.isbind/is_bind_expression.pass.cpp index 7f8dd4a98d2..83fa452fecb 100644 --- a/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.isbind/is_bind_expression.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.isbind/is_bind_expression.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <functional> // template<class T> struct is_bind_expression diff --git a/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.isbind/is_bind_expression_03.pass.cpp b/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.isbind/is_bind_expression_03.pass.cpp new file mode 100644 index 00000000000..12a78dbc754 --- /dev/null +++ b/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.isbind/is_bind_expression_03.pass.cpp @@ -0,0 +1,39 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// <functional> + +//----------------------------------------------------------------------------- +// TESTING template<class T> struct is_bind_expression +// +// bind is not implemented in C++03 so nothing is a bind expression. However +// for compatibility reasons the trait is_bind_expression should be available +// in C++03 and it should always return false. + +#include <functional> + +template <class T> +void test() { + static_assert(!std::is_bind_expression<T>::value, ""); +} + +struct C {}; + +int main() { + test<int>(); + test<void>(); + test<C>(); + test<C&>(); + test<C const&>(); + test<C*>(); + test<void()>(); + test<int(*)()>(); + test<int (C::*)()>(); + test<decltype(std::placeholders::_2)>(); +} |