C++ Logo

std-proposals

Advanced search

Re: Explode in-place, constexpr

From: Richard Hodges <hodges.r_at_[hidden]>
Date: Tue, 22 Sep 2020 08:25:45 +0200
Without wishing to be a party pooper, this mailing list probably isn't the
best place for such questions. It's actually for posting proposals to
modify the C++ standard and this is probably the reason you're not getting
a storm of help.

You may want to try stackoverflow.com, cpplang slack or includecpp discord
channels.

If you wanted to leave a trail here to where the question was asked I'm
sure people would be happy to follow up.

The first first question you're going to be asked is, "what are you
actually trying to achieve, since this looks like an XY problem."

http://xyproblem.info/


On Tue, 22 Sep 2020 at 06:45, Ramkumar Ramachandra via Std-Proposals <
std-proposals_at_[hidden]> wrote:

> 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.
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>


-- 
Richard Hodges
hodges.r_at_[hidden]
office: +442032898513
home: +376841522
mobile: +376380212

Received on 2020-09-22 01:25:58