aboutsummaryrefslogtreecommitdiff
path: root/lib/libcxx/include/iterator
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2024-05-09 01:52:26 -0700
committerAndrew Kelley <andrew@ziglang.org>2024-05-09 01:52:26 -0700
commitbcb534c295d5cc6fd63caa570cc08e6b148a507c (patch)
tree0b17cb1e632d894f50f25e550d5113f232b0e877 /lib/libcxx/include/iterator
parentd9b00ee4ba48717ff6b306a6f9419e7b604ac04b (diff)
parent74f52954b9cb40d59d80b839b45bb859146731a7 (diff)
downloadzig-bcb534c295d5cc6fd63caa570cc08e6b148a507c.tar.gz
zig-bcb534c295d5cc6fd63caa570cc08e6b148a507c.zip
Merge branch 'llvm18'
Upgrades the LLVM, Clang, and LLD dependencies to LLVM 18.x Related to #16270
Diffstat (limited to 'lib/libcxx/include/iterator')
-rw-r--r--lib/libcxx/include/iterator40
1 files changed, 19 insertions, 21 deletions
diff --git a/lib/libcxx/include/iterator b/lib/libcxx/include/iterator
index 42843781eb..2f92807423 100644
--- a/lib/libcxx/include/iterator
+++ b/lib/libcxx/include/iterator
@@ -634,25 +634,25 @@ public:
bool failed() const noexcept;
};
-template <class C> constexpr auto begin(C& c) -> decltype(c.begin());
-template <class C> constexpr auto begin(const C& c) -> decltype(c.begin());
-template <class C> constexpr auto end(C& c) -> decltype(c.end());
-template <class C> constexpr auto end(const C& c) -> decltype(c.end());
-template <class T, size_t N> constexpr T* begin(T (&array)[N]);
-template <class T, size_t N> constexpr T* end(T (&array)[N]);
-
-template <class C> auto constexpr cbegin(const C& c) -> decltype(std::begin(c)); // C++14
-template <class C> auto constexpr cend(const C& c) -> decltype(std::end(c)); // C++14
-template <class C> auto constexpr rbegin(C& c) -> decltype(c.rbegin()); // C++14
-template <class C> auto constexpr rbegin(const C& c) -> decltype(c.rbegin()); // C++14
-template <class C> auto constexpr rend(C& c) -> decltype(c.rend()); // C++14
-template <class C> constexpr auto rend(const C& c) -> decltype(c.rend()); // C++14
-template <class E> reverse_iterator<const E*> constexpr rbegin(initializer_list<E> il); // C++14
-template <class E> reverse_iterator<const E*> constexpr rend(initializer_list<E> il); // C++14
-template <class T, size_t N> reverse_iterator<T*> constexpr rbegin(T (&array)[N]); // C++14
-template <class T, size_t N> reverse_iterator<T*> constexpr rend(T (&array)[N]); // C++14
-template <class C> constexpr auto crbegin(const C& c) -> decltype(std::rbegin(c)); // C++14
-template <class C> constexpr auto crend(const C& c) -> decltype(std::rend(c)); // C++14
+template <class C> constexpr auto begin(C& c) -> decltype(c.begin()); // constexpr since C++17
+template <class C> constexpr auto begin(const C& c) -> decltype(c.begin()); // constexpr since C++17
+template <class C> constexpr auto end(C& c) -> decltype(c.end()); // constexpr since C++17
+template <class C> constexpr auto end(const C& c) -> decltype(c.end()); // constexpr since C++17
+template <class T, size_t N> constexpr T* begin(T (&array)[N]) noexcept;
+template <class T, size_t N> constexpr T* end(T (&array)[N]) noexcept;
+
+template <class C> constexpr auto cbegin(const C& c) noexcept(see-below) -> decltype(std::begin(c)); // C++14
+template <class C> constexpr auto cend(const C& c) noexcept(see-below) -> decltype(std::end(c)); // C++14
+template <class C> constexpr auto rbegin(C& c) -> decltype(c.rbegin()); // C++14, constexpr since C++17
+template <class C> constexpr auto rbegin(const C& c) -> decltype(c.rbegin()); // C++14, constexpr since C++17
+template <class C> constexpr auto rend(C& c) -> decltype(c.rend()); // C++14, constexpr since C++17
+template <class C> constexpr auto rend(const C& c) -> decltype(c.rend()); // C++14, constexpr since C++17
+template <class E> constexpr reverse_iterator<const E*> rbegin(initializer_list<E> il); // C++14, constexpr since C++17
+template <class E> constexpr reverse_iterator<const E*> rend(initializer_list<E> il); // C++14, constexpr since C++17
+template <class T, size_t N> constexpr reverse_iterator<T*> rbegin(T (&array)[N]); // C++14, constexpr since C++17
+template <class T, size_t N> constexpr reverse_iterator<T*> rend(T (&array)[N]); // C++14, constexpr since C++17
+template <class C> constexpr auto crbegin(const C& c) -> decltype(std::rbegin(c)); // C++14, constexpr since C++17
+template <class C> constexpr auto crend(const C& c) -> decltype(std::rend(c)); // C++14, constexpr since C++17
// 24.8, container access:
template <class C> constexpr auto size(const C& c) -> decltype(c.size()); // C++17
@@ -716,8 +716,6 @@ template <class E> constexpr const E* data(initializer_list<E> il) noexcept;
#include <__iterator/wrap_iter.h>
#include <__memory/addressof.h>
#include <__memory/pointer_traits.h>
-#include <cstddef>
-#include <initializer_list>
#include <version>
// standard-mandated includes