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 9 // <functional> 10 // REQUIRES: c++03 || c++11 || c++14 11 12 // class function<R(ArgTypes...)> 13 14 // template<class A> function(allocator_arg_t, const A&); 15 // 16 // This signature was removed in C++17 17 18 // This test runs in C++03, but we have deprecated using std::function in C++03. 19 // ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS 20 21 #include <functional> 22 #include <cassert> 23 24 #include "test_macros.h" 25 #include "min_allocator.h" 26 27 int main(int, char**) 28 { 29 { 30 std::function<int(int)> f(std::allocator_arg, bare_allocator<int>()); 31 assert(!f); 32 } 33 34 return 0; 35 } 36