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 // template<class T> struct is_bind_expression 13 14 #include <functional> 15 16 template <bool Expected, class T> 17 void 18 test(const T&) 19 { 20 static_assert(std::is_bind_expression<T>::value == Expected, ""); 21 } 22 23 struct C {}; 24 25 int main() 26 { 27 test<true>(std::bind(C())); 28 test<true>(std::bind(C(), std::placeholders::_2)); 29 test<true>(std::bind<int>(C())); 30 test<false>(1); 31 test<false>(std::placeholders::_2); 32 } 33