On 5/26/22 11:01, Marek Polacek wrote:
In this problem, we are failing to properly perform copy elision with
a conditional operator, so this:
constexpr A a = true ? A{} : A{};
fails with:
error: 'A{((const A*)(&))}' is not a constant expression
The whole initializer is
TARGET_EXPR }
In this problem, we are failing to properly perform copy elision with
a conditional operator, so this:
constexpr A a = true ? A{} : A{};
fails with:
error: 'A{((const A*)(&))}' is not a constant expression
The whole initializer is
TARGET_EXPR }> : TARGET_EXPR }>>
where the outermost TAR