is_bind_expression.pass.cpp revision bc8d3f97eb5c958007f2713238472e0c1c8fe02c
1//===----------------------------------------------------------------------===//
2//
3// ��������������������The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. 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