alloc_function.fail.cpp 792 B

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