[diff.cpp14.dcl.dcl]

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

## C.4 C++ and ISO C++ 2014 [[diff.cpp14]](diff.cpp14#dcl.dcl)

### C.4.4 [[dcl]](dcl "9 Declarations"): declarations [diff.cpp14.dcl.dcl]

[1](#1)

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

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


**Change:** Removal of register [*storage-class-specifier*](dcl.stc#nt:storage-class-specifier "9.2.2 Storage class specifiers [dcl.stc]")[.](#1.sentence-1)

  


**Rationale:** Enable repurposing of deprecated keyword in future revisions of C++[.](#1.sentence-2)

  


**Effect on original feature:** A valid C++ 2014 declaration utilizing the register[*storage-class-specifier*](dcl.stc#nt:storage-class-specifier "9.2.2 Storage class specifiers [dcl.stc]") is ill-formed in this revision of C++[.](#1.sentence-3)

The specifier can simply be removed to retain the original meaning[.](#1.sentence-4)

[2](#2)

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

**Affected subclause:** [[dcl.spec.auto]](dcl.spec.auto)  


**Change:** auto deduction from [*braced-init-list*](dcl.init.general#nt:braced-init-list "9.5.1 General [dcl.init.general]")[.](#2.sentence-1)

  


**Rationale:** More intuitive deduction behavior[.](#2.sentence-2)

  


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

[*Example [1](#example-1)*: auto x1{1}; // was std​::​initializer_list<int>, now intauto x2{1, 2}; // was std​::​initializer_list<int>, now ill-formed â *end example*]

[3](#3)

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

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


**Change:** Make exception specifications be part of the type system[.](#3.sentence-1)

  


**Rationale:** Improve type-safety[.](#3.sentence-2)

  


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

[*Example [2](#example-2)*: void g1() noexcept;void g2();template<class T> int f(T *, T *);int x = f(g1, g2); // ill-formed; previously well-formed â *end example*]

[4](#4)

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

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


**Change:** Definition of an aggregate is extended
to apply to user-defined types with base classes[.](#4.sentence-1)

  


**Rationale:** To increase convenience of aggregate initialization[.](#4.sentence-2)

  


**Effect on original feature:** Valid C++ 2014 code may fail to compile or produce different results in this
revision of C++; initialization from an empty initializer list will
perform aggregate initialization instead of invoking a default constructor
for the affected types[.](#4.sentence-3)

[*Example [3](#example-3)*: struct derived;struct base {friend struct derived;private: base();};struct derived : base {};

derived d1{}; // error; the code was well-formed in C++ 2014 derived d2; // still OK â *end example*]
