C++ Logo

sg7

Advanced search

Re: Scalable reflection - questions / comments

From: (wrong string) íková <hanicka_at_[hidden]>
Date: Tue, 1 Feb 2022 18:15:54 +0100
In such hyphotetical scenario... If arg1 and arg2 can be used in consteval context (as the result is needed for a template instantiation) why meta::info can't?

Hana

> On 1. 2. 2022, at 18:01, Peter Dimov via SG7 <sg7_at_[hidden]> wrote:
>
> Matus Chochlik wrote:
>> template <std::meta::info mo> auto baz() {
>> return do_something([: mo :]);
>> }
>>
>> template <std::meta::info mo> auto bar(auto arg1, auto arg2) {
>> return bar<transform1<transform2<mo>(arg2)>(arg1)>();
>> }
>
> I suppose P1240 is betting that it would be possible to still do
>
> template <std::meta::info mo> auto bar(auto arg1, auto arg2) {
> return baz<transform1(transform2(mo, arg2), arg1)>();
> }
>
> with transform1 and transform2 being consteval.
>
>
> --
> SG7 mailing list
> SG7_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/sg7

Received on 2022-02-01 17:16:00