From 6cd96bad607c5d6a2302e97ab6f749edb85b82ed Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Tue, 29 Oct 2019 20:17:02 +0000 Subject: [PATCH] Fix compilation errors with Clang * include/bits/range_access.h (ranges::disable_sized_range) (ranges::begin, ranges::end, ranges::cbegin, ranges::cend) (ranges::rbegin, ranges::rend, ranges::crbegin, ranges::crend) (ranges::size, ranges::empty, ranges::data, ranges::cdata) (ranges::range, ranges::sized_range, ranges::advance, ranges::distance) (ranges::next, ranges::prev): Guard with __cpp_lib_concepts. * include/bits/stl_iterator.h (disable_sized_sentinel): Likewise. From-SVN: r277589 --- libstdc++-v3/ChangeLog | 8 ++++++++ libstdc++-v3/include/bits/range_access.h | 2 ++ libstdc++-v3/include/bits/stl_iterator.h | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index e9908841420..11cce3517bc 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,13 @@ 2019-10-29 Jonathan Wakely + * include/bits/range_access.h (ranges::disable_sized_range) + (ranges::begin, ranges::end, ranges::cbegin, ranges::cend) + (ranges::rbegin, ranges::rend, ranges::crbegin, ranges::crend) + (ranges::size, ranges::empty, ranges::data, ranges::cdata) + (ranges::range, ranges::sized_range, ranges::advance, ranges::distance) + (ranges::next, ranges::prev): Guard with __cpp_lib_concepts. + * include/bits/stl_iterator.h (disable_sized_sentinel): Likewise. + * include/bits/alloc_traits.h (__cpp_lib_constexpr_dynamic_alloc): Define. (allocator_traits::_S_construct, allocator_traits::_S_destroy) diff --git a/libstdc++-v3/include/bits/range_access.h b/libstdc++-v3/include/bits/range_access.h index 3b6ed9aa66a..9c8bef6b3a1 100644 --- a/libstdc++-v3/include/bits/range_access.h +++ b/libstdc++-v3/include/bits/range_access.h @@ -349,6 +349,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __adl_data(_Container& __cont) noexcept(noexcept(data(__cont))) { return data(__cont); } +#ifdef __cpp_lib_concepts namespace ranges { template @@ -1061,6 +1062,7 @@ namespace ranges } } // namespace ranges +#endif // library concepts #endif // C++20 _GLIBCXX_END_NAMESPACE_VERSION } // namespace diff --git a/libstdc++-v3/include/bits/stl_iterator.h b/libstdc++-v3/include/bits/stl_iterator.h index 966087598f4..c10117e9b38 100644 --- a/libstdc++-v3/include/bits/stl_iterator.h +++ b/libstdc++-v3/include/bits/stl_iterator.h @@ -442,7 +442,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION make_reverse_iterator(_Iterator __i) { return reverse_iterator<_Iterator>(__i); } -# if __cplusplus > 201703L +# if __cplusplus > 201703L && defined __cpp_lib_concepts template requires (!sized_sentinel_for<_Iterator1, _Iterator2>) inline constexpr bool disable_sized_sentinel, -- 2.30.2