#243: Missing user-provided default constructor ----------------------+----------------------------------------------------- Reporter: levill_r | Owner: lazzara Type: defect | Status: new Priority: major | Milestone: Component: Milena | Version: 1.0 Keywords: | ----------------------+----------------------------------------------------- Changes (by lazzara):
* owner: Olena Team => lazzara
Comment:
GCC 4.6.2 changelog :
In 4.6.0 and 4.6.1 G++ no longer allows objects of const-qualified type to be default initialized unless the type has a user-declared default constructor. In 4.6.2 G++ implements the proposed resolution of DR 253 (http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#253), so default initialization is allowed if it initializes all subobjects. Code that fails to compile can be fixed by providing an initializer e.g. struct A { A(); }; struct B : A { int i; }; const B b = B(); Use -fpermissive to allow the old, non-conforming behaviour.