On Fri, Sep 1, 2017 at 9:08 AM, Olivier Mascia <o...@integral.be> wrote:
>
> The (calling program) bug starts here above.
> sql_statement_request.data() is not guaranteed to be zero-terminated (and
> generally isn't).
>

FWIW, it is since std C++11, i.e. .data() and .c_str() are equivalent going
forward [1].

It wasn't before, of course, you are right, in pre-C++11 situations.

Note that in C++17 and later, std::string implicitly converts [2] to the
new std::string_view [3],
whose .data() member [4] does behave like the old pre-C++11 .data() of
std::string [1]. --DD

[1] http://en.cppreference.com/w/cpp/string/basic_string/data
[2]
http://en.cppreference.com/w/cpp/string/basic_string/operator_basic_string_view
[3] http://en.cppreference.com/w/cpp/string/basic_string_view
[4] http://en.cppreference.com/w/cpp/string/basic_string_view/data
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to