summaryrefslogtreecommitdiffstats
path: root/libcxx/include/algorithm
diff options
context:
space:
mode:
authorLouis Dionne <ldionne@apple.com>2018-09-23 18:35:00 +0000
committerLouis Dionne <ldionne@apple.com>2018-09-23 18:35:00 +0000
commitea5cd3b4760ebe1b0ad4469aa9ba221e00795c51 (patch)
tree9c7905f4a666a957d0e4e88fb734da604a61012d /libcxx/include/algorithm
parent19952add7cea53050ee9b80b99494ebc00acefda (diff)
downloadbcm5719-llvm-ea5cd3b4760ebe1b0ad4469aa9ba221e00795c51.tar.gz
bcm5719-llvm-ea5cd3b4760ebe1b0ad4469aa9ba221e00795c51.zip
[libc++] Add deprecated attributes to many deprecated components
Summary: These deprecation warnings are opt-in: they are only enabled when the _LIBCXX_DEPRECATION_WARNINGS macro is defined, which is not the case by default. Note that this is a first step in the right direction, but I wasn't able to get an exhaustive list of all deprecated components per standard, so there's certainly stuff that's missing. The list of components this commit marks as deprecated is: in C++11: - auto_ptr, auto_ptr_ref - binder1st, binder2nd, bind1st(), bind2nd() - pointer_to_unary_function, pointer_to_binary_function, ptr_fun() - mem_fun_t, mem_fun1_t, const_mem_fun_t, const_mem_fun1_t, mem_fun() - mem_fun_ref_t, mem_fun1_ref_t, const_mem_fun_ref_t, const_mem_fun1_ref_t, mem_fun_ref() in C++14: - random_shuffle() in C++17: - unary_negate, binary_negate, not1(), not2() <rdar://problem/18168350> Reviewers: mclow.lists, EricWF Subscribers: christof, dexonsmith, llvm-commits Differential Revision: https://reviews.llvm.org/D48912 llvm-svn: 342843
Diffstat (limited to 'libcxx/include/algorithm')
-rw-r--r--libcxx/include/algorithm4
1 files changed, 2 insertions, 2 deletions
diff --git a/libcxx/include/algorithm b/libcxx/include/algorithm
index 1359fda53b5..c5c17296e68 100644
--- a/libcxx/include/algorithm
+++ b/libcxx/include/algorithm
@@ -2952,7 +2952,7 @@ public:
_LIBCPP_FUNC_VIS __rs_default __rs_get();
template <class _RandomAccessIterator>
-void
+_LIBCPP_DEPRECATED_IN_CXX14 void
random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last)
{
typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type;
@@ -2973,7 +2973,7 @@ random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last)
}
template <class _RandomAccessIterator, class _RandomNumberGenerator>
-void
+_LIBCPP_DEPRECATED_IN_CXX14 void
random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last,
#ifndef _LIBCPP_CXX03_LANG
_RandomNumberGenerator&& __rand)
OpenPOWER on IntegriCloud