[gcc(refs/users/ppalka/heads/integer_class_type)] Tweak the __advanceable concept to make difference_type.cc compile

Patrick Palka ppalka@gcc.gnu.org
Fri Jan 17 03:59:00 GMT 2020


https://gcc.gnu.org/g:32343303a86027835ee90c2fe7ec6c9a5b139c16

commit 32343303a86027835ee90c2fe7ec6c9a5b139c16
Author: Patrick Palka <ppalka@gcc.gnu.org>
Date:   Thu Jan 16 14:34:40 2020 -0500

    Tweak the __advanceable concept to make difference_type.cc compile

Diff:
---
 libstdc++-v3/include/std/ranges | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libstdc++-v3/include/std/ranges b/libstdc++-v3/include/std/ranges
index ea558c7..a471d20 100644
--- a/libstdc++-v3/include/std/ranges
+++ b/libstdc++-v3/include/std/ranges
@@ -628,8 +628,8 @@ namespace ranges
       concept __advanceable = __decrementable<_It> && totally_ordered<_It>
 	&& requires( _It __i, const _It __j, const __iota_diff_t<_It> __n)
 	{
-	  { __i += __n } -> same_as<_It&>;
-	  { __i -= __n } -> same_as<_It&>;
+	  { __i += (_It)__n } -> same_as<_It&>;
+	  { __i -= (_It)__n } -> same_as<_It&>;
 	  _It(__j + __n);
 	  _It(__n + __j);
 	  _It(__j - __n);



More information about the Libstdc++-cvs mailing list