alloc_function.fail.cpp 746 B

123456789101112131415161718192021222324252627282930
  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. // <functional>
  10. // XFAIL: c++98, c++03, c++11, c++14
  11. // class function<R(ArgTypes...)>
  12. // template<class A> function(allocator_arg_t, const A&, const function&);
  13. //
  14. // This signature was removed in C++17
  15. #include <functional>
  16. #include <cassert>
  17. #include "test_macros.h"
  18. int main()
  19. {
  20. typedef std::function<void(int)> F;
  21. F f1;
  22. F f2(std::allocator_arg, std::allocator<int>(), f1);
  23. }