From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Sun, 16 Feb 2020 20:25:53 +0300 From: Michael Shigorin To: devel@lists.altlinux.org Message-ID: <20200216172553.GA25883@imap.altlinux.org> References: <20200216111659.GA26792@altlinux.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200216111659.GA26792@altlinux.org> User-Agent: Mutt/1.10.1 (2018-07-13) Subject: [devel] [nitpick] Re: [APT PATCH] rpmSingle{Pkg, Src}Index::ArchiveURI(): avoid cases with undefined behavior X-BeenThere: devel@lists.altlinux.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: ALT Linux Team development discussions List-Id: ALT Linux Team development discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Feb 2020 17:25:54 -0000 Archived-At: List-Archive: List-Post: On Sun, Feb 16, 2020 at 02:17:00PM +0300, Dmitry V. Levin wrote: > > * File.length() < 2. Since File was a non-const string, > > File[File.length()] might be UB before C++11. Now, File is const, and > > it is guaranteed that File[File.length()] == 0. > We can safely assume C++11 ...especially if it's spelled out explicitly with -std=. -- š---- WBR, Michael Shigorin / http://altlinux.org šš------ http://opennet.ru / http://anna-news.info