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 
10 // <functional>
11 
12 // not2
13 //  deprecated in C++17
14 
15 // UNSUPPORTED: clang-4.0
16 // UNSUPPORTED: c++98, c++03, c++11, c++14
17 // REQUIRES: verify-support
18 
19 // MODULES_DEFINES: _LIBCPP_ENABLE_DEPRECATION_WARNINGS
20 #define _LIBCPP_ENABLE_DEPRECATION_WARNINGS
21 
22 #include <functional>
23 
24 #include "test_macros.h"
25 
26 struct Predicate {
27     typedef int first_argument_type;
28     typedef int second_argument_type;
operator ()Predicate29     bool operator()(first_argument_type, second_argument_type) const { return true; }
30 };
31 
main()32 int main() {
33     std::not2(Predicate()); // expected-error{{'not2<Predicate>' is deprecated}}
34 }
35