C++ Logo

sg7

Advanced search

Re: Attributes introspection

From: Aurelien Cassagnes <aurelien.cassagnes_at_[hidden]>
Date: Wed, 24 Apr 2024 21:07:51 +0900
I know attributes arent part of the type otherwise we’d be more or less
done with decltype…

Toy example fwiw public is not distinct from private function as far as
typing system is concerned, but this level of info is proposed to be made
available via metafunctions in the reflection paper.

Now if someone did try to fork and implement this proposal and came back
with arguments for why this just cant ever be done , we can put this to
rest.

Sent from Gmail Mobile


On Wed, Apr 24, 2024 at 20:30 Jean-Baptiste Vallon Hoarau <
jeanbaptiste.vallon_at_[hidden]> wrote:

> What Barry was saying is that this cannot work : templates are
> instantiated per type, and the attributes are not part of the type, so the
> information is simply not passed down to the instantiation of the template,
> reflection or not.
>
> Le mer. 24 avr. 2024 à 13:26, Aurelien Cassagnes via SG7 <
> sg7_at_[hidden]> a écrit :
>
>> Barry I understand that right now there is no reasons for it to work, the
>> purpose of this thread is to flesh out what the proposal look like.
>> Gather interest and feedback not share an hypothetical implementation
>> because it doesnt exist yet.
>>
>> Besides seeing interest, the feedback i’m interested is what sections
>> need to be discussed in more detail in the draft for it to become more
>> meaningful
>> thanks.
>>
>> Sent from Gmail Mobile
>>
>>
>> On Sun, Apr 21, 2024 at 1:47 Barry Revzin <barry.revzin_at_[hidden]> wrote:
>>
>>>
>>>
>>> On Fri, Apr 19, 2024, 9:53 PM Aurelien Cassagnes via SG7 <
>>> sg7_at_[hidden]> wrote:
>>>
>>>> Fleshed out the proposal draft and it's available for feedback at
>>>> https://github.com/zebullax/wg21/blob/main/generated/proposal.pdf
>>>>
>>>
>>> How do you expect this to work exactly?
>>>
>>> The type of foo is bool(int), it's not [[nodiscard]] bool(int).
>>> Regardless of the question of reflecting on attributes... logInvoke(foo, 0)
>>> is going to call logInvoke<bool(int), int>. There aren't any attributes
>>> left to reflect on anymore.
>>>
>>> Barry
>>>
>>>> --
>>
> SG7 mailing list
>> SG7_at_[hidden]
>> https://lists.isocpp.org/mailman/listinfo.cgi/sg7
>>
>

Received on 2024-04-24 12:08:05