[devel] [nitpick] Re: [APT PATCH] rpmSingle{Pkg, Src}Index::ArchiveURI(): avoid cases with undefined behavior

Michael Shigorin mike на altlinux.org
Вс Фев 16 20:25:53 MSK 2020


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


Подробная информация о списке рассылки Devel