Date: Tue, 22 Sep 2020 06:44:59 +0200
I have:
```
template <size_t N>
constexpr std::nullptr_t Skip[N] = nullptr;
```
```
constexpr TableEntry<i32 Line::*> LineTable[] = {Skip<1>, {Skip<1>,
&Line::BrushType}, {&Line::BrushColor, &Line::Padding}, {Skip<1>,
&Line::BrushSize}, Skip<7>, {Skip, &Line::NChildren}};
```
Unfortunately, the `Skip` entries are now nested aggregates, and I don't
know how to flatten this `constexpr` aggregate at compile-time, although I
don't see what's preventing it.
Any suggestions?
R.
```
template <size_t N>
constexpr std::nullptr_t Skip[N] = nullptr;
```
```
constexpr TableEntry<i32 Line::*> LineTable[] = {Skip<1>, {Skip<1>,
&Line::BrushType}, {&Line::BrushColor, &Line::Padding}, {Skip<1>,
&Line::BrushSize}, Skip<7>, {Skip, &Line::NChildren}};
```
Unfortunately, the `Skip` entries are now nested aggregates, and I don't
know how to flatten this `constexpr` aggregate at compile-time, although I
don't see what's preventing it.
Any suggestions?
R.
Received on 2020-09-21 23:45:38