TupleFunction.pass.cpp 643 B

1234567891011121314151617181920212223242526272829303132
  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. // UNSUPPORTED: c++98, c++03
  9. // This is for bugs 18853 and 19118
  10. #include <tuple>
  11. #include <functional>
  12. struct X
  13. {
  14. X() {}
  15. template <class T>
  16. X(T);
  17. void operator()() {}
  18. };
  19. int main(int, char**)
  20. {
  21. X x;
  22. std::function<void()> f(x);
  23. return 0;
  24. }