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 16template <bool Expected, class T> 17void 18test(const T&) 19{ 20 static_assert(std::is_bind_expression<T>::value == Expected, ""); 21} 22 23struct C {}; 24 25int 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