1 | //===----------------------------------------------------------------------===// |
2 | // |
3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
4 | // See https://llvm.org/LICENSE.txt for license information. |
5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
6 | // |
7 | //===----------------------------------------------------------------------===// |
8 | |
9 | // <functional> |
10 | |
11 | //----------------------------------------------------------------------------- |
12 | // TESTING template<class T> struct is_bind_expression |
13 | // |
14 | // bind is not implemented in C++03 so nothing is a bind expression. However |
15 | // for compatibility reasons the trait is_bind_expression should be available |
16 | // in C++03 and it should always return false. |
17 | |
18 | #include <functional> |
19 | |
20 | #include "test_macros.h" |
21 | |
22 | template <class T> |
23 | void test() { |
24 | static_assert(!std::is_bind_expression<T>::value, "" ); |
25 | } |
26 | |
27 | struct C {}; |
28 | |
29 | int main(int, char**) { |
30 | test<int>(); |
31 | test<void>(); |
32 | test<C>(); |
33 | test<C&>(); |
34 | test<C const&>(); |
35 | test<C*>(); |
36 | test<void()>(); |
37 | test<int(*)()>(); |
38 | test<int (C::*)()>(); |
39 | test<decltype(std::placeholders::_2)>(); |
40 | |
41 | return 0; |
42 | } |
43 | |