alloc.pass.cpp 805 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. // <functional>
  9. // REQUIRES: c++98 || c++03 || c++11 || c++14
  10. // class function<R(ArgTypes...)>
  11. // template<class A> function(allocator_arg_t, const A&);
  12. //
  13. // This signature was removed in C++17
  14. #include <functional>
  15. #include <cassert>
  16. #include "test_macros.h"
  17. #include "min_allocator.h"
  18. int main(int, char**)
  19. {
  20. {
  21. std::function<int(int)> f(std::allocator_arg, bare_allocator<int>());
  22. assert(!f);
  23. }
  24. return 0;
  25. }