C++ Logo


Advanced search

Re: [SG7] Update: P1240R2 — Scalable Reflection

From: Peter Dimov <pdimov_at_[hidden]>
Date: Tue, 18 Jan 2022 22:06:43 +0200
Daveed Vandevoorde wrote:
> On Jan 18, 2022, at 2:16 PM, Peter Dimov <pdimov_at_[hidden]
> <mailto:pdimov_at_[hidden]> > wrote:
> For the specific strings obtained by some_reflection_function().data(), yes.
> constexpr auto len = std::strlen(name_of(^S).data());
> That seems reasonable, but it feels a bit orthogonal to P1240. I.e., it would be
> weird if those were the _only_ strings for which that worked.
> Presumably, it should work for any core-constant null-terminated char array?

Yes, of course. And it does already work for those, under GCC et al.

Received on 2022-01-18 20:06:45