Note that in gcc we don't see this because gcc "allows const objects with no initializer or user-provided default constructor if the defaulted constructor initializes all the subobjects.", which IMHO, is what should have been in the standard in the first place... (see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42844)
616 - Displacement const disp;
617 + Displacement disp;
... and Point and Rectangle
The error is "default initialization of an object of const type '...' requires a user-provided default constructor"
I'd rather we didn't drop const and value initialize instead:
Displacement const disp{};
Alternatively we could provide appropriate constructors:
Displacement() {}
Displacement(DeltaX const& dx, DeltaY const& dy) : dx{dx}, dy{dy} {}
Note that in gcc we don't see this because gcc "allows const objects with no initializer or user-provided default constructor if the defaulted constructor initializes all the subobjects.", which IMHO, is what should have been in the standard in the first place... (see http:// gcc.gnu. org/bugzilla/ show_bug. cgi?id= 42844)