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 11 // not2 12 // deprecated in C++17 13 14 // UNSUPPORTED: clang-4.0 15 // UNSUPPORTED: c++03, c++11, c++14 16 // ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX20_REMOVED_NEGATORS 17 18 #include <functional> 19 20 #include "test_macros.h" 21 22 struct Predicate { 23 typedef int first_argument_type; 24 typedef int second_argument_type; 25 bool operator()(first_argument_type, second_argument_type) const { return true; } 26 }; 27 28 int main(int, char**) { 29 std::not2(Predicate()); // expected-warning {{'not2<Predicate>' is deprecated}} 30 31 return 0; 32 } 33