This seems counterintuitive to me. I consider `sizeof` and `decltype` a poor version of a reflection and you can do this:

struct X {
int a;
static constexpr unsigned size = sizeof(X::a);
using type = decltype(X::a);
};

https://compiler-explorer.com/z/9f7WKn

Even when the type is not yet complete. I personally think we should support such cases.

Hana

On 2. 11. 2020, at 15:05, Andrew Sutton via SG7 <sg7@lists.isocpp.org> wrote:

However, you cannot use lookup in the sense of [basic.lookup]. This should fail:

struct X {
  int a;
  consteval {
    auto info = reflexpr(X::a); // error: X is incomplete.
  }
};

Andrew