diff --git a/alib2std/src/extensions/array.hpp b/alib2std/src/extensions/array.hpp index 4220df88f27474c9b9ca05fdfe25686a96d27731..f582152962ee3b4a7e9395b6c30b2582221d8194 100644 --- a/alib2std/src/extensions/array.hpp +++ b/alib2std/src/extensions/array.hpp @@ -61,8 +61,7 @@ public: /** * Default constructor needed by g++ since it is not inherited */ - array ( ) noexcept : std::array < T, N > ( ) { - } + array ( ) = default; /** * Copy constructor needed by g++ since it is not inherited diff --git a/alib2std/src/extensions/bitset.hpp b/alib2std/src/extensions/bitset.hpp index df779e177d0202f2efdf97949ab40f19c93d228b..41083254da820079260a03b29f46597e45939fb6 100644 --- a/alib2std/src/extensions/bitset.hpp +++ b/alib2std/src/extensions/bitset.hpp @@ -57,8 +57,7 @@ public: /** * Default constructor needed by g++ since it is not inherited */ - bitset ( ) noexcept : std::bitset < N > ( ) { - } + bitset ( ) = default; /** * Copy constructor needed by g++ since it is not inherited diff --git a/alib2std/src/extensions/forward_list.hpp b/alib2std/src/extensions/forward_list.hpp index 70c10f3f14ceea13d943a008b5d3df5430f71628..19aad2fbbb603a8b65c8f939574c6b4fd556b3a5 100644 --- a/alib2std/src/extensions/forward_list.hpp +++ b/alib2std/src/extensions/forward_list.hpp @@ -21,32 +21,18 @@ namespace ext { template < class T, class Alloc = std::allocator < T > > class forward_list : public std::forward_list < T, Alloc >, AllocFix < Alloc > { public: -#ifdef __clang__ using std::forward_list < T, Alloc >::forward_list; using std::forward_list < T, Alloc >::operator =; -#else - forward_list ( ) noexcept : std::forward_list < T, Alloc > ( ) { - } +#ifndef __clang__ + forward_list ( ) = default; - forward_list ( const forward_list & other ) noexcept : std::forward_list < T, Alloc > ( other ) { - } + forward_list ( const forward_list & other ) = default; - forward_list ( forward_list && other ) noexcept : std::forward_list < T, Alloc > ( std::move ( other ) ) { - } + forward_list ( forward_list && other ) = default; - using std::forward_list < T, Alloc >::forward_list; + forward_list & operator = ( forward_list && other ) = default; - forward_list & operator = ( forward_list && other ) noexcept { - static_cast < std::forward_list < T, Alloc > & > ( * this ) = std::move ( other ); - return * this; - } - - forward_list & operator = ( const forward_list & other ) noexcept { - static_cast < std::forward_list < T, Alloc > & > ( * this ) = other; - return * this; - } - - using std::forward_list < T, Alloc >::operator =; + forward_list & operator = ( const forward_list & other ) = default; #endif }; diff --git a/alib2std/src/extensions/list.hpp b/alib2std/src/extensions/list.hpp index 9b26e78dc20a03db699c3c44526f161717f01425..b7bfe9f633d6a48123ea8e68f04fd6c94ae2098c 100644 --- a/alib2std/src/extensions/list.hpp +++ b/alib2std/src/extensions/list.hpp @@ -24,8 +24,7 @@ public: using std::list < T, Alloc >::list; using std::list < T, Alloc >::operator =; #ifndef __clang__ - list ( ) noexcept : std::list < T, Alloc > ( ) { - } + list ( ) = default; list ( const list & other ) = default; diff --git a/alib2std/src/extensions/map.hpp b/alib2std/src/extensions/map.hpp index 10111ccfc8c5c5a42ef9adc8b6bad3fca6fb1027..20b09bf436a719bf54a4623b27ae6a2262a53172 100644 --- a/alib2std/src/extensions/map.hpp +++ b/alib2std/src/extensions/map.hpp @@ -26,8 +26,7 @@ public: using std::map< T, R, Cmp, Alloc >::map; using std::map< T, R, Cmp, Alloc >::operator =; #ifndef __clang__ - map ( ) noexcept : std::map < T, R, Cmp, Alloc > ( ) { - } + map ( ) = default; map ( const map & other ) = default; diff --git a/alib2std/src/extensions/set.hpp b/alib2std/src/extensions/set.hpp index 05db6959c5f1758ea631b435df7a3248ecf1ce5d..e7bedf486f8230245697877ea1c4743c5463e213 100644 --- a/alib2std/src/extensions/set.hpp +++ b/alib2std/src/extensions/set.hpp @@ -24,8 +24,7 @@ public: using std::set < T, Cmp, Alloc >::set; using std::set < T, Cmp, Alloc >::operator =; #ifndef __clang__ - set ( ) noexcept : std::set < T, Cmp, Alloc > ( ) { - } + set ( ) = default; set ( const set & other ) = default; diff --git a/alib2std/src/extensions/string.hpp b/alib2std/src/extensions/string.hpp index 2c35a54aa95289d07131713ef8a18b78eddb5692..fba695ccdf3c8ee371502bb6aa5a7f8b5096ed2c 100644 --- a/alib2std/src/extensions/string.hpp +++ b/alib2std/src/extensions/string.hpp @@ -22,8 +22,7 @@ public: using std::string::string; using std::string::operator =; #ifndef __clang__ - string ( ) noexcept : std::string ( ) { - } + string ( ) = default; string ( const string & other ) = default; diff --git a/alib2std/src/extensions/tuple.hpp b/alib2std/src/extensions/tuple.hpp index 8c5b6c90ea72879263522997a929fbd7ff37a72e..1e30ced3607b0c21a5a296fc4d2dbdf9f771e9ed 100644 --- a/alib2std/src/extensions/tuple.hpp +++ b/alib2std/src/extensions/tuple.hpp @@ -23,8 +23,7 @@ public: using std::tuple< Ts ... >::tuple; using std::tuple< Ts ... >::operator =; #ifndef __clang__ - tuple ( ) noexcept : std::tuple < Ts ... > ( ) { - } + tuple ( ) = default; tuple ( const tuple & other ) = default; diff --git a/alib2std/src/extensions/unordered_map.hpp b/alib2std/src/extensions/unordered_map.hpp index 56de1dfb5a750042feb4d689cffe81a2a04f11c6..3a433e672bdb0c5e6e1517d9dc7a5d5838dde44e 100644 --- a/alib2std/src/extensions/unordered_map.hpp +++ b/alib2std/src/extensions/unordered_map.hpp @@ -24,8 +24,7 @@ public: using std::unordered_map < T, R, Hash, KeyEqual, Alloc >::unordered_map; using std::unordered_map < T, R, Hash, KeyEqual, Alloc >::operator =; #ifndef __clang__ - unordered_map ( ) noexcept : std::unordered_map < T, R, Hash, KeyEqual, Alloc > ( ) { - } + unordered_map ( ) = default; unordered_map ( const unordered_map & other ) = default; diff --git a/alib2std/src/extensions/vector.hpp b/alib2std/src/extensions/vector.hpp index 63b24e3aff0ca5a4cb48dae3ec9940def0a5a1ea..1920b29b386f24ed65625a78b55418750b52c222 100644 --- a/alib2std/src/extensions/vector.hpp +++ b/alib2std/src/extensions/vector.hpp @@ -26,8 +26,7 @@ public: using std::vector< T, Alloc >::vector; using std::vector< T, Alloc >::operator =; #ifndef __clang__ - vector ( ) noexcept : std::vector < T, Alloc > ( ) { - } + vector ( ) = default; vector ( const vector & other ) = default;