https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101263

--- Comment #6 from Barry Revzin <barry.revzin at gmail dot com> ---
The "real" answer is allowing constexpr placement new, but that obviously
doesn't help you right now.

But I think the helpful answer is that you can add a constructor to your
storage like storage(init_from_invoke_t, Args&&... args) that initializes the
underlying value from invoke((Args&&)args...), and then construct_at(&storage,
init_from_invoke, [&]() -> decltype(auto) { return *i; }).

Something like that?

Reply via email to