blob: 5e347c4c571568180cac8c5d01d3faa01625bdb7 [file] [log] [blame]
Eric Fiselier8d5cbd72016-04-20 00:14:32 +00001//===----------------------------------------------------------------------===//
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// UNSUPPORTED: c++98, c++03
11
12// <functional>
13
14// template<CopyConstructible Fn, CopyConstructible... Types>
15// unspecified bind(Fn, Types...);
16// template<Returnable R, CopyConstructible Fn, CopyConstructible... Types>
17// unspecified bind(Fn, Types...);
18
19// https://llvm.org/bugs/show_bug.cgi?id=23141
20#include <functional>
21#include <type_traits>
22
23struct Fun
24{
25 template<typename T, typename U>
Eric Fiselierbda804e2016-04-28 03:17:56 +000026 void operator()(T &&, U &&) const
Eric Fiselier8d5cbd72016-04-20 00:14:32 +000027 {
28 static_assert(std::is_same<U, int &>::value, "");
29 }
30};
31
32int main()
33{
34 std::bind(Fun{}, std::placeholders::_1, 42)("hello");
35}