Library: add special treatment for std::string_view

Sting-view is tricky, since it deliberately does not define a
conversion operator; rather, string has an explicit constructor.
This design was chosen on purpose, since creating a string will
„materialise“ the string-view, which could have severe performance
ramifications when done automatically.

Regarding Lumiera's string-conversion tooling, it seems indicated
thus to add std::string_view explicitly as a known conversion path,
even while this conversion does not happen implicitly.
This commit is contained in:
Fischlurch 2024-03-24 21:36:18 +01:00
parent aab446ce48
commit fd1ce5f0c1

View file

@ -154,6 +154,8 @@ namespace meta {
{
static Yes_t check_implicit(std::string);
static Yes_t check_implicit(std::string_view);
static Yes_t check_implicit(const char*);
static No_t check_implicit(...);