C++ Logo

sg7

Advanced search

Re: Update: P1240R2 — Scalable Reflection

From: Peter Dimov <pdimov_at_[hidden]>
Date: Sun, 23 Jan 2022 06:28:40 +0200
Tony V E wrote:
> On Tue, Jan 18, 2022 at 1:40 PM Daveed Vandevoorde via SG7
> <sg7_at_[hidden] <mailto:sg7_at_[hidden]> > 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.
>
> Daveed
>
>
>
> Will this lead to invalid expectations regarding string_views? Sometimes strlen
> works on string_views, sometimes it doesn't?

Hence Barry's allusion to http://open-std.org/JTC1/SC22/WG21/docs/papers/2019/p1402r0.pdf.

I still have no idea why people object so strongly to it.

Received on 2022-01-23 04:28:42