alloc_nullptr.fail.cpp 726 B

123456789101112131415161718192021222324252627
  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&, 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, std::allocator<int>(), nullptr);
  21. }