alloc_nullptr.pass.cpp 749 B

12345678910111213141516171819202122232425262728
  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. // REQUIRES-ANY: c++98, c++03, c++11, c++14
  11. // class function<R(ArgTypes...)>
  12. // template<class A> function(allocator_arg_t, const A&, nullptr_t);
  13. //
  14. // This signature was removed in C++17
  15. #include <functional>
  16. #include <cassert>
  17. #include "min_allocator.h"
  18. int main()
  19. {
  20. std::function<int(int)> f(std::allocator_arg, bare_allocator<int>(), nullptr);
  21. assert(!f);
  22. }