[diff.cpp11.dcl.dcl]

# Annex C (informative) Compatibility [[diff]](./#diff)

## C.5 C++ and ISO C++ 2011 [[diff.cpp11]](diff.cpp11#dcl.dcl)

### C.5.5 [[dcl]](dcl "9 Declarations"): declarations [diff.cpp11.dcl.dcl]

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/compatibility.tex#L2050)

**Affected subclause:** [[dcl.constexpr]](dcl.constexpr)  


**Change:** constexpr non-static member functions are not implicitlyconst member functions[.](#1.sentence-1)

  


**Rationale:** Necessary to allow constexpr member functions to mutate
the object[.](#1.sentence-2)

  


**Effect on original feature:** Valid C++ 2011 code may fail to compile in this revision of C++[.](#1.sentence-3)

[*Example [1](#example-1)*: struct S {constexpr const int &f(); int &f();};

This code is valid in C++ 2011
but invalid in this revision of C++ because it declares the same member
function twice with different return types[.](#1.sentence-4)

â *end example*]

[2](#2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/compatibility.tex#L2071)

**Affected subclause:** [[dcl.init.aggr]](dcl.init.aggr)  


**Change:** Classes with default member initializers can be aggregates[.](#2.sentence-1)

  


**Rationale:** Necessary to allow default member initializers to be used
by aggregate initialization[.](#2.sentence-2)

  


**Effect on original feature:** Valid C++ 2011 code may fail to compile or may change meaning in this revision of C++[.](#2.sentence-3)

[*Example [2](#example-2)*: struct S { // Aggregate in C++ 2014 onwards.int m = 1;};struct X {operator int(); operator S();};
X a{};
S b{a}; // uses copy constructor in C++ 2011,// performs aggregate initialization in this revision of C++ â *end example*]
