Skip to content

Commit

Permalink
Fixed start date for glibc++ range support
Browse files Browse the repository at this point in the history
  • Loading branch information
rollbear committed Dec 22, 2024
1 parent 1364af1 commit ea7be30
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions include/strong_type/range.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ namespace internal {
struct not_an_iterator {};


#if defined(STRONG_TYPE_HAS_RANGES) && (!defined(__GLIBCXX__) || (__GLIBCXX__ >= 20230601L))
#if defined(STRONG_TYPE_HAS_RANGES) && (!defined(__GLIBCXX__) || (__GLIBCXX__ >= 20230528L))
template <typename T>
auto begin_type(T* t) -> decltype(std::ranges::begin(*t));
#else
Expand All @@ -49,7 +49,7 @@ auto begin_type(T* t) -> decltype(t->begin());

auto begin_type(...) -> not_an_iterator;

#if defined(STRONG_TYPE_HAS_RANGES) && (!defined(__GLIBCXX__) || (__GLIBCXX__ >= 20230601L))
#if defined(STRONG_TYPE_HAS_RANGES) && (!defined(__GLIBCXX__) || (__GLIBCXX__ >= 20230528L))
template <typename T>
auto const_begin_type(const T* t) -> decltype(std::ranges::begin(*t));
#else
Expand All @@ -58,7 +58,7 @@ auto const_begin_type(const T* t) -> decltype(t->begin());
#endif
auto const_begin_type(...) -> not_an_iterator;

#if defined(STRONG_TYPE_HAS_RANGES) && (!defined(__GLIBCXX__) || (__GLIBCXX__ >= 20230601L))
#if defined(STRONG_TYPE_HAS_RANGES) && (!defined(__GLIBCXX__) || (__GLIBCXX__ >= 20230528L))
template <typename T>
auto end_type(T* t) -> decltype(std::ranges::end(*t));
#else
Expand All @@ -67,26 +67,26 @@ auto end_type(T* t) -> decltype(t->end());
#endif
auto end_type(...) -> not_an_iterator;

#if defined(STRONG_TYPE_HAS_RANGES) && (!defined(__GLIBCXX__) || (__GLIBCXX__ >= 20230601L))
#if defined(STRONG_TYPE_HAS_RANGES) && (!defined(__GLIBCXX__) || (__GLIBCXX__ >= 20230528L))
template <typename T>
auto const_end_type(const T* t) -> decltype(std::ranges::end(*t));
#else
template <typename T>
auto const_end_type(T* t) -> decltype(t->end());
auto const_end_type(const T* t) -> decltype(t->end());
#endif

auto const_end_type(...) -> not_an_iterator;

#if defined(STRONG_TYPE_HAS_RANGES) && (!defined(__GLIBCXX__) || (__GLIBCXX__ >= 20230601L))
#if defined(STRONG_TYPE_HAS_RANGES) && (!defined(__GLIBCXX__) || (__GLIBCXX__ >= 20230528L))
template <typename T>
auto cbegin_type(const T* t) -> decltype(std::ranges::cbegin(*t));
#else
template <typename T>
auto cbegin_type(T* t) -> decltype(t->cbegin());
auto cbegin_type(const T* t) -> decltype(t->cbegin());
#endif
auto cbegin_type(...) -> not_an_iterator;

#if defined(STRONG_TYPE_HAS_RANGES) && (!defined(__GLIBCXX__) || (__GLIBCXX__ >= 20230601L))
#if defined(STRONG_TYPE_HAS_RANGES) && (!defined(__GLIBCXX__) || (__GLIBCXX__ >= 20230528L))
template <typename T>
auto cend_type(const T* t) -> decltype(std::ranges::cend(*t));
#else
Expand Down

0 comments on commit ea7be30

Please sign in to comment.