C++ Logo

sg7

Advanced search

Re: [SG7] Update: P1240R2 — Scalable Reflection

From: Matus Chochlik <chochlik_at_[hidden]>
Date: Tue, 18 Jan 2022 18:11:52 +0100
On Tue, Jan 18, 2022 at 5:53 PM Peter Dimov via SG7 <sg7_at_[hidden]>
wrote:

> > Daveed Vandevoorde wrote:
> > > — The proposed metafunctions now use span and string_view instead
> > of
> > > vector and string
> >
> > NTCS please :-(
>
> I'm serious. Please provide a way to obtain a `char const*` instead of
> std::string_view; that could take the form of a consteval magic function
> taking the std::string_view returned from the official API.
>
> Since the compiler will not want to be married to a particular stdlib,
> its internal primitives are not going to be creating std::string_views
> anyway.
>

IMO one of the things we should discuss is what is the intent of the
consteval API. Is it just: here are the basic blocks, build your own API on
top of it or is this intended to be used directly by users. This should
help to answer questions like this.
Another thing is: do we plan to implement something like a standard
reflection-algorithm library later? If so, how do we plan to implement
things like for_each, filter, transform, and many others, taking
user-defined (predicate, transformation, compare, etc.) functions where
these functions may or may not do unreflection (which requires
instantiation contexts). How would the parameter lists of such algorithms
look like? How do we imagine such functions will compose into bigger
algorithms?

Received on 2022-01-18 17:12:04