A class must have a valid copy or move constructor for any of this syntax to be legal:
C x = factory(); C y( factory() ); C z{ factory() };
In
Issues like this were among the prime motivations for the change in C++17 to allow these initializations (and exclude the copies from the language, not merely as an optimization).