octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #60016] libqhull was deprecated in favor of li


From: Stefan Brüns
Subject: [Octave-bug-tracker] [bug #60016] libqhull was deprecated in favor of libqhull_r
Date: Fri, 9 Apr 2021 08:02:25 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:86.0) Gecko/20100101 Firefox/86.0

Follow-up Comment #14, bug #60016 (project octave):

std::basic_string<char> (aka std::string) has been contiguous since C++03, and
since C++11 is also guaranteed to be 0-terminated.

https://en.cppreference.com/w/cpp/string/basic_string

> The elements of a basic_string are stored contiguously, that is, for a
basic_string s, &*(s.begin() + n) == &*s.begin() + n for any n in [0,
s.size()), or, 
> *equivalently, a pointer to s[0] can be passed to functions that expect a
pointer to the first element of a null-terminated (since C++11)CharT[]
array.*

The 0-terminated requirement change in C++11 was done exactly for this use
case.

If you don't trust cppreference or my words, see Herb Sutters comment here:
https://herbsutter.com/2008/04/07/cringe-not-vectors-are-guaranteed-to-be-contiguous/#comment-483

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?60016>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]