is_bind_expression_03.pass.cpp (1079B)
1 //===----------------------------------------------------------------------===// 2 // 3 // The LLVM Compiler Infrastructure 4 // 5 // This file is dual licensed under the MIT and the University of Illinois Open 6 // Source Licenses. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 10 // <functional> 11 12 //----------------------------------------------------------------------------- 13 // TESTING template<class T> struct is_bind_expression 14 // 15 // bind is not implemented in C++03 so nothing is a bind expression. However 16 // for compatibility reasons the trait is_bind_expression should be available 17 // in C++03 and it should always return false. 18 19 #include <functional> 20 21 template <class T> 22 void test() { 23 static_assert(!std::is_bind_expression<T>::value, ""); 24 } 25 26 struct C {}; 27 28 int main() { 29 test<int>(); 30 test<void>(); 31 test<C>(); 32 test<C&>(); 33 test<C const&>(); 34 test<C*>(); 35 test<void()>(); 36 test<int(*)()>(); 37 test<int (C::*)()>(); 38 test<decltype(std::placeholders::_2)>(); 39 }