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
This commit is contained in:
Jonathan Wakely 2019-10-29 20:17:02 +00:00 committed by Jonathan Wakely
parent 540218dd24
commit 6cd96bad60
3 changed files with 11 additions and 1 deletions

View File

@ -1,5 +1,13 @@
2019-10-29 Jonathan Wakely <jwakely@redhat.com>
* 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)

View File

@ -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<typename>
@ -1061,6 +1062,7 @@ namespace ranges
}
} // namespace ranges
#endif // library concepts
#endif // C++20
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace

View File

@ -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<typename _Iterator1, typename _Iterator2>
requires (!sized_sentinel_for<_Iterator1, _Iterator2>)
inline constexpr bool disable_sized_sentinel<reverse_iterator<_Iterator1>,