C++ Logo

sg7

Advanced search

Re: [SG7] TS Reflection experimental implementation in Clang available

From: Cleiton Santoia <cleitonsantoia_at_[hidden]>
Date: Tue, 23 Nov 2021 11:28:06 -0300
Sorry if I´m a little bit off, but this implementation is from that
"type-based" proposal ?
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 ?



Cleiton


Em seg., 22 de nov. de 2021 às 05:02, Hana Dusíková via SG7 <
sg7_at_[hidden]> escreveu:

> Hi,
>
> I'm really happy that I can announce our own Matus Chochlik implemented TS
> Reflection in his fork of Clang.
>
> You can experiment with it at Compiler Explorer:
> https://compiler-explorer.com/z/TrYEYhqMK
>
> And find source code here: https://github.com/matus-chochlik/llvm-project
>
> Any feedback and bug report is welcome, I think Matus hopes for
> upstreaming it soon.
>
> Thanks Matus for awesome work! ❤️
>
> Hana
> --
> SG7 mailing list
> SG7_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/sg7
>

Received on 2021-11-23 08:28:20