alloc_nullptr.fail.cpp 763 B

12345678910111213141516171819202122232425262728
  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&, nullptr_t);
  12. //
  13. // This signature was removed in C++17
  14. #include <functional>
  15. #include <cassert>
  16. #include "min_allocator.h"
  17. int main(int, char**)
  18. {
  19. std::function<int(int)> f(std::allocator_arg, std::allocator<int>(), nullptr);
  20. return 0;
  21. }