TupleFunction.pass.cpp 632 B

1234567891011121314151617181920212223242526272829303132333435
  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. // This is for bugs 18853 and 19118
  10. #if __cplusplus >= 201103L
  11. #include <tuple>
  12. #include <functional>
  13. struct X
  14. {
  15. X() {}
  16. template <class T>
  17. X(T);
  18. void operator()() {}
  19. };
  20. int
  21. main()
  22. {
  23. X x;
  24. std::function<void()> f(x);
  25. }
  26. #else
  27. int main () {}
  28. #endif