On Mon, Nov 2, 2020 at 11:40 PM Cleiton Santoia via SG7 <sg7@lists.isocpp.org> wrote:
Sorry, I made few mistakes, let me be more clear:
Can the reflexpr operator in #2 "see" members of class X before reflexpr usage like decltype ?

consteval auto get_member_types(info classtype) {
    auto result = members_of(classtype);  // #1  members_of can see incomplete class members ?
    for (auto &info : result) {
        info = type_of(info);   //  I suppose this line converts 'int X::*' to 'int'
    }
    return result;
};

struct X {
    int a;
    bool b;
    char c;
    // so far we have 3 members...
    std::variant< typename( get_member_types( reflexpr (X) ) ) > d; // #2 can reflexpr see previous 3 members ? ( goto #1 )
};

Is the type of d "variant<int, bool, char>"  ? Is this illegal ?

Yes, I believe it should be. Except:

for (auto info : result) // no reference

and the implementation doesn't currently support expansion of reifer/splice operations. You should have to write:

typename(get_member_types(x))...

or in P2237

|get_member_types(x)|...