This code does not compile in Coliru , although it seems to correspond to iso §5.19 p2 of the 9th marker point and iso §3.9 p10, i.e. Sis a literal type, so S a(1);it should be considered a constant expression. In particular, iso §3.9 p10 bullet point 3 says nothing about unified members.
#include <iostream>
struct S
{
int i;
float x;
constexpr S(int j) : i{j} {}
};
int main()
{
constexpr S a(1);
}
source
share