not1.depr_in_cxx17.fail.cpp (863B)
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 // not1 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 argument_type; 28 bool operator()(argument_type) const { return true; } 29 }; 30 31 int main() { 32 std::not1(Predicate()); // expected-error{{'not1<Predicate>' is deprecated}} 33 }