Date: Tue, 18 Jan 2022 20:46:20 +0200
Daveed Vandevoorde wrote:
> How about specifying that all string_view results from reflection functions
> (there aren’t that many) have a null-terminated data()?
> E,g,:
>
> auto len = std::strlen(name_of(^S).data()); // Okay and as intuitively
> expected.
Works for me, with the minor addition of `constexpr` before `auto len`.
> How about specifying that all string_view results from reflection functions
> (there aren’t that many) have a null-terminated data()?
> E,g,:
>
> auto len = std::strlen(name_of(^S).data()); // Okay and as intuitively
> expected.
Works for me, with the minor addition of `constexpr` before `auto len`.
Received on 2022-01-18 18:46:22