placeholders.pass.cpp 815 B

123456789101112131415161718192021222324252627282930313233343536
  1. //===----------------------------------------------------------------------===//
  2. //
  3. // The LLVM Compiler Infrastructure
  4. //
  5. // This file is distributed under the University of Illinois Open Source
  6. // License. See LICENSE.TXT for details.
  7. //
  8. //===----------------------------------------------------------------------===//
  9. // <functional>
  10. // placeholders
  11. #include <functional>
  12. template <class T>
  13. void
  14. test(const T& t)
  15. {
  16. T t2;
  17. T t3 = t;
  18. }
  19. int main()
  20. {
  21. test(std::placeholders::_1);
  22. test(std::placeholders::_2);
  23. test(std::placeholders::_3);
  24. test(std::placeholders::_4);
  25. test(std::placeholders::_5);
  26. test(std::placeholders::_6);
  27. test(std::placeholders::_7);
  28. test(std::placeholders::_8);
  29. test(std::placeholders::_9);
  30. test(std::placeholders::_10);
  31. }