TupleFunction.pass.cpp 669 B

12345678910111213141516171819202122232425262728293031323334
  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. #include "test_macros.h"
  13. struct X
  14. {
  15. X() {}
  16. template <class T>
  17. X(T);
  18. void operator()() {}
  19. };
  20. int main(int, char**)
  21. {
  22. X x;
  23. std::function<void()> f(x);
  24. return 0;
  25. }