I noticed that the constructor with parentheses behaves differently, at least for floats and ints.
// int a, b{}, c = T(), d = T{}, e();
float a, b{}, c = T(), d = T{}, e();
endl(std::cout << a << ", " << b << ", " << c << ", " << d << ", " << e);
// 0, 0, 0, 0, 1
It's not a default constructor, the parentheses were parsed as part of the type. I printed the types, and e
has type float (&)()
(or just float()
with proper forwarding), so I think it's a default-constructed function. The result of calling it has a type, but calling it results in the linker error you'd expect. Its value would be 0 if it were a function pointer. Why would its value be 1, or how does it end up as 1 when it's printed?
::Wrapper(void)`, and only `Wrappere = Wrapper()` resulted in `value==0`.