[gcc(refs/users/ppalka/heads/libstdcxx-constrained-algos)] Also treat __int128 as integer-like when using integer-class types

Patrick Palka ppalka@gcc.gnu.org
Thu Jan 16 19:43:00 GMT 2020


https://gcc.gnu.org/g:a1ba047bd5c21e208919b88d4c2ecc494c73df0c

commit a1ba047bd5c21e208919b88d4c2ecc494c73df0c
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Wed Jan 15 23:07:27 2020 +0000

    Also treat __int128 as integer-like when using integer-class types

Diff:
---
 libstdc++-v3/include/bits/iterator_concepts.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/libstdc++-v3/include/bits/iterator_concepts.h b/libstdc++-v3/include/bits/iterator_concepts.h
index 8ffda85..c7d14f5 100644
--- a/libstdc++-v3/include/bits/iterator_concepts.h
+++ b/libstdc++-v3/include/bits/iterator_concepts.h
@@ -507,10 +507,16 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
     template<typename _Tp>
       concept __is_integer_like = integral<_Tp>
+#if defined _GLIBCXX_INTEGER_LIKE_TYPES && __SIZEOF_INT128__
+	|| same_as<_Tp, __int128> || same_as<_Tp, unsigned __int128>
+#endif
 	|| same_as<_Tp, __max_diff_type> || same_as<_Tp, __max_size_type>;
 
     template<typename _Tp>
       concept __is_signed_integer_like = signed_integral<_Tp>
+#if defined _GLIBCXX_INTEGER_LIKE_TYPES && __SIZEOF_INT128__
+	|| same_as<_Tp, __int128>
+#endif
 	|| same_as<_Tp, __max_diff_type>;
 
   } // namespace ranges::__detail



More information about the Libstdc++-cvs mailing list