alloc_nullptr.pass.cpp 813 B

123456789101112131415161718192021222324252627282930
  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&, nullptr_t);
  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. std::function<int(int)> f(std::allocator_arg, bare_allocator<int>(), nullptr);
  21. assert(!f);
  22. return 0;
  23. }