Date: Tue, 18 Jan 2022 12:52:08 -0500
> On Jan 18, 2022, at 11:53 AM, 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.
I missed this before. We could return a NTCS instead: Would that be more usable? It’s certainly easier to implement.
(FWIW, my implementation currently does create std::string_views in its “internal primitives”. I suspect other implementations may go the __builtin_… route, but we tend to just intercept the standard functions directly.)
Daveed
>
>> 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.
I missed this before. We could return a NTCS instead: Would that be more usable? It’s certainly easier to implement.
(FWIW, my implementation currently does create std::string_views in its “internal primitives”. I suspect other implementations may go the __builtin_… route, but we tend to just intercept the standard functions directly.)
Daveed
Received on 2022-01-18 17:52:10