From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 102175 invoked by alias); 24 Feb 2020 14:16:36 -0000 Mailing-List: contact libstdc++-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libstdc++-owner@gcc.gnu.org Received: (qmail 102159 invoked by uid 89); 24 Feb 2020 14:16:35 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=daniel, Daniel, (unknown), H*r:ip*209.85.208.195 X-HELO: mail-lj1-f195.google.com Received: from mail-lj1-f195.google.com (HELO mail-lj1-f195.google.com) (209.85.208.195) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 24 Feb 2020 14:16:34 +0000 Received: by mail-lj1-f195.google.com with SMTP id o15so10281436ljg.6; Mon, 24 Feb 2020 06:16:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=j2C0WWnBtocAHANN+yPTr2Z0I4v9Te57aUnWzdl6hdY=; b=Xjs9s22H93v8ZCAT5dbTl8v9oeing194kPuAqZjhpcn+95sCSTIo0mThpnZkjx5mZe bonQmzfIbg6mvDo7hS+aX6LGv6a10xb3ZTy1c5wM9a55ZszguN9x7oighj+2uOvxYglY YoX+OTNVv4cTOOEHm3sglvfCiG8HXyfmLR1D/e7hpLWnxAq5bxEZFiaCEHuIrdbO/xjX LOHDG2jdSvq0Nq9Kckv7JrZVypRA8uqjustJsTAI1Z61ye11BzqjzST0wowRBB3TNQma n+9yeqTuNp7us0EITk66lpUWdbEQDCYk9Si+xLMEzqO3zrZ5QHy1BAVWZd87JBlJ+vmZ vXsA== MIME-Version: 1.0 References: <20200221192922.2412286-1-ppalka@redhat.com> <20200224134742.GC9441@redhat.com> In-Reply-To: From: =?UTF-8?Q?Daniel_Kr=C3=BCgler?= Date: Mon, 24 Feb 2020 14:16:00 -0000 Message-ID: Subject: Re: [PATCH] libstdc++: P0769R2 Add shift to To: Patrick Palka Cc: Jonathan Wakely , gcc-patches List , "libstdc++" Content-Type: text/plain; charset="UTF-8" X-SW-Source: 2020-02/txt/msg00157.txt.bz2 Am Mo., 24. Feb. 2020 um 15:12 Uhr schrieb Patrick Palka : > > On Mon, 24 Feb 2020, Jonathan Wakely wrote: > [...] > > > @@ -3683,6 +3683,98 @@ namespace ranges > > > inline constexpr __prev_permutation_fn prev_permutation{}; > > > > > > } // namespace ranges > > > + > > > + template > > > + constexpr ForwardIterator > > > + shift_left(ForwardIterator __first, ForwardIterator __last, > > > + typename iterator_traits::difference_type __n) > > > + { > > > + __glibcxx_assert(__n >= 0); > > > > If I'm reading the current draft correctly, n < 0 is allowed (and does > > nothing) so we shouldn't assert here. > > From what I can tell, this is changed by P1243R4 (Rangify new > algorithms) which adds the precondition n >= 0 to these routines. Yes, that's correct. This part of the wording applied the accepted changes of p1233r1. - Daniel