C++ Logo


Advanced search

Re: [SG14] Questioning the validity of constexpr-everything - at least in reference to colony

From: Matt Bentley <mattreecebentley_at_[hidden]>
Date: Tue, 9 Mar 2021 12:15:38 +1300
On 9/03/2021 1:45 am, Tjernstrom, Staffan wrote:
> Given that the advantages of colony are (to my mind) entirely in the realm of run-time (what would a colony do at compile time that could not be achieved with a constexpr std::map?), when added to the issues caused by constexpr you highlight, I don't see a use case for a constexpr colony.

I think the issues I've highlighted are relevant across all constexpr
containers - personally I think it's best to have std::array and
std::vector be the experimental cases.

The case for using colony at compile-time, as it's been told to me, is
that there may be some functions which which may be called at
compile-time and at run-time. In either case, if colony is the best fit
performance-wise then it helps with both compile times and runtime

Received on 2021-03-08 17:15:44