xref: /llvm-project/libcxx/test/std/utilities/tuple/tuple.tuple/TupleFunction.pass.cpp (revision 31cbe0f240f660f15602c96b787c58a26f17e179)
1 //===----------------------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 // UNSUPPORTED: c++03
10 
11 // This is for bugs 18853 and 19118
12 
13 #include <tuple>
14 #include <functional>
15 
16 #include "test_macros.h"
17 
18 struct X
19 {
XX20     X() {}
21 
22     template <class T>
23     X(T);
24 
operator ()X25     void operator()() {}
26 };
27 
main(int,char **)28 int main(int, char**)
29 {
30     X x;
31     std::function<void()> f(x);
32 
33   return 0;
34 }
35