
On Thu, Sep 25, 2025 at 10:34 AM Klemens Morgenstern via Boost <boost@lists.boost.org> wrote:
1. a type-safe alternative to const char * (no size_t)
What's not type-safe about `const char*`?
2. a std::string_view that guarantees a null at the end (with size_t)
That one is useful for a Boost.SQLite wrapper. But not with a no-embedded-null requirement, as SQLite is just fine storing those. Yes, it's string-based built-in SQL functions would stop of the first NULL (embedded or "final"), but that's a different issue. And stored text values in SQLite are supposed to be in UTF-8 (or UTF-16), but that's not enforced! The different between blob and text is several small, both can store arbitrary content, it's just that text can have custom collations, and might be displayed differently by programs, including the sqlite3 CLI, but fundamentally, both know their size, always, and can store arbitrary content. Some places in the SQLite API do require a null-terminated string, with no option to explicit give a size, but in most places it matters, the size is explicit. --DD