mirror of
https://github.com/llvm-mirror/libcxx.git
synced 2025-10-23 01:18:52 +08:00

Summary: In r342843, I added deprecation warnings to some facilities that were deprectated in C++14 and C++17. However, those deprecation warnings were not enabled by default. After discussing this on IRC, we had finally gotten consensus to enable those warnings by default, and I'm getting around to doing that only now. Reviewers: mclow.lists, EricWF Subscribers: christof, jkorous, dexonsmith, jdoerfert, libcxx-commits Differential Revision: https://reviews.llvm.org/D58140 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@355961 91177308-0d34-0410-b5e6-96231b3b80d8
32 lines
799 B
C++
32 lines
799 B
C++
//===----------------------------------------------------------------------===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// <functional>
|
|
|
|
// not1
|
|
// deprecated in C++17
|
|
|
|
// UNSUPPORTED: clang-4.0
|
|
// UNSUPPORTED: c++98, c++03, c++11, c++14
|
|
// REQUIRES: verify-support
|
|
|
|
#include <functional>
|
|
|
|
#include "test_macros.h"
|
|
|
|
struct Predicate {
|
|
typedef int argument_type;
|
|
bool operator()(argument_type) const { return true; }
|
|
};
|
|
|
|
int main(int, char**) {
|
|
std::not1(Predicate()); // expected-error{{'not1<Predicate>' is deprecated}}
|
|
|
|
return 0;
|
|
}
|