mirror of
https://github.com/abseil/abseil-cpp.git
synced 2026-06-04 12:07:05 +08:00
Deprecate and inline historical functions in Abseil
Migrates uses of absl:: symbols to std:: symbols PiperOrigin-RevId: 914475818 Change-Id: I35908b9d91b4fba465b9fe3e5b2c8f497f2f192b
This commit is contained in:
committed by
Copybara-Service
parent
bc5e9d0ce0
commit
d4aba0a323
@@ -27,6 +27,7 @@
|
||||
#include <type_traits>
|
||||
|
||||
#include "absl/base/config.h"
|
||||
#include "absl/base/macros.h"
|
||||
|
||||
namespace absl {
|
||||
ABSL_NAMESPACE_BEGIN
|
||||
@@ -40,8 +41,39 @@ ABSL_NAMESPACE_BEGIN
|
||||
//
|
||||
// See the documentation for the STL <algorithm> header for more information:
|
||||
// https://en.cppreference.com/w/cpp/header/algorithm
|
||||
using std::equal;
|
||||
using std::rotate;
|
||||
|
||||
template <class InputIt1, class InputIt2>
|
||||
ABSL_DEPRECATE_AND_INLINE()
|
||||
constexpr bool equal(InputIt1 first1, InputIt1 last1, InputIt2 first2) {
|
||||
return std::equal(first1, last1, first2);
|
||||
}
|
||||
|
||||
template <class InputIt1, class InputIt2, class BinaryPredicate>
|
||||
ABSL_DEPRECATE_AND_INLINE()
|
||||
constexpr bool equal(InputIt1 first1, InputIt1 last1, InputIt2 first2,
|
||||
BinaryPredicate p) {
|
||||
return std::equal(first1, last1, first2, p);
|
||||
}
|
||||
|
||||
template <class InputIt1, class InputIt2>
|
||||
ABSL_DEPRECATE_AND_INLINE()
|
||||
constexpr bool equal(InputIt1 first1, InputIt1 last1, InputIt2 first2,
|
||||
InputIt2 last2) {
|
||||
return std::equal(first1, last1, first2, last2);
|
||||
}
|
||||
|
||||
template <class InputIt1, class InputIt2, class BinaryPredicate>
|
||||
ABSL_DEPRECATE_AND_INLINE()
|
||||
constexpr bool equal(InputIt1 first1, InputIt1 last1, InputIt2 first2,
|
||||
InputIt2 last2, BinaryPredicate p) {
|
||||
return std::equal(first1, last1, first2, last2, p);
|
||||
}
|
||||
|
||||
template <class ForwardIt>
|
||||
ABSL_DEPRECATE_AND_INLINE()
|
||||
constexpr ForwardIt rotate(ForwardIt first, ForwardIt n_first, ForwardIt last) {
|
||||
return std::rotate(first, n_first, last);
|
||||
}
|
||||
|
||||
// linear_search()
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user