Date: Tue, 23 Nov 2021 17:52:20 +0100
BTW: https://compiler-explorer.com/z/M1o3hjTYs
On Tue, Nov 23, 2021 at 4:52 PM Matus Chochlik <chochlik_at_[hidden]> wrote:
> Hi,
>
> On Tue, Nov 23, 2021 at 3:28 PM Cleiton Santoia via SG7 <
> sg7_at_[hidden]> wrote:
>
>> Sorry if I´m a little bit off, but this implementation is from that
>> "type-based" proposal ?
>>
>
> Correct, it implements the recently published reflection TS [
> https://www.iso.org/standard/76425.html]
>
>
>> What about the "meta::info" proposal ? It is not going forward ?
>>
>>
>> anyway, I tried this but could not get the name of X inside a template
>> function:
>>
>> void foo(auto x) {
>> using r = reflexpr( decltype(x) );
>> std::cout << "Name of type template 'T':"
>> << get_name_v<r> << std::endl;
>> };
>>
>> struct X {} x;
>> foo(x);
>>
>>
>> https://compiler-explorer.com/z/n3T8f3sdz
>>
>> Is it supposed to work ?
>>
> The implementation is still work-in-progress, not completely debugged and
> partially based on a PoC from 2019 where `auto`-typed regular function
> arguments were not implemented yet.
> Eventually, this is supposed to work.
>
> BR,
> --Matus
>
On Tue, Nov 23, 2021 at 4:52 PM Matus Chochlik <chochlik_at_[hidden]> wrote:
> Hi,
>
> On Tue, Nov 23, 2021 at 3:28 PM Cleiton Santoia via SG7 <
> sg7_at_[hidden]> wrote:
>
>> Sorry if I´m a little bit off, but this implementation is from that
>> "type-based" proposal ?
>>
>
> Correct, it implements the recently published reflection TS [
> https://www.iso.org/standard/76425.html]
>
>
>> What about the "meta::info" proposal ? It is not going forward ?
>>
>>
>> anyway, I tried this but could not get the name of X inside a template
>> function:
>>
>> void foo(auto x) {
>> using r = reflexpr( decltype(x) );
>> std::cout << "Name of type template 'T':"
>> << get_name_v<r> << std::endl;
>> };
>>
>> struct X {} x;
>> foo(x);
>>
>>
>> https://compiler-explorer.com/z/n3T8f3sdz
>>
>> Is it supposed to work ?
>>
> The implementation is still work-in-progress, not completely debugged and
> partially based on a PoC from 2019 where `auto`-typed regular function
> arguments were not implemented yet.
> Eventually, this is supposed to work.
>
> BR,
> --Matus
>
Received on 2021-11-23 10:52:33