
Can a zero-terminated string view return the size? On Wed, Sep 24, 2025 at 3:22 PM Andrzej Krzemienski via Boost < boost@lists.boost.org> wrote:
Hi Everyone, Would Boost libraries benefit from having a string_view-like type with the guarantee that the underlying character sequence is null-terminated?
This could be as yet another Boost library, or as part of Boost.Core. Maybe Boost already has such a type somewhere?
The need for such a type surfaces time and again. When a library needs to be passed both const char * and std::string cheaply, only to pass it down to low-level C-libraries later. We have seen one recently during the review of Boost.Sqlite. One is again proposed for standardization: wg21.link/p3655.
Regards, &rzej; _______________________________________________ Boost mailing list -- boost@lists.boost.org To unsubscribe send an email to boost-leave@lists.boost.org https://lists.boost.org/mailman3/lists/boost.lists.boost.org/ Archived at: https://lists.boost.org/archives/list/boost@lists.boost.org/message/E3D7ZHSI...