Index: include/algorithm =================================================================== --- include/algorithm +++ include/algorithm @@ -2952,7 +2952,9 @@ public: // constructors and reset functions - explicit uniform_int_distribution(result_type __a = 0, + uniform_int_distribution() : uniform_int_distribution(0) {} + + explicit uniform_int_distribution(result_type __a, result_type __b = numeric_limits::max()) : __p_(param_type(__a, __b)) {} explicit uniform_int_distribution(const param_type& __p) : __p_(__p) {} Index: include/locale =================================================================== --- include/locale +++ include/locale @@ -92,7 +92,8 @@ typedef typename Codecvt::state_type state_type; typedef typename wide_string::traits_type::int_type int_type; - explicit wstring_convert(Codecvt* pcvt = new Codecvt); // explicit in C++14 + wstring_convert() : wstring_convert(new Codecvt) {} + explicit wstring_convert(Codecvt* pcvt); // explicit in C++14 wstring_convert(Codecvt* pcvt, state_type state); explicit wstring_convert(const byte_string& byte_err, // explicit in C++14 const wide_string& wide_err = wide_string()); @@ -121,12 +122,13 @@ public: typedef typename Tr::state_type state_type; - explicit wbuffer_convert(streambuf* bytebuf = 0, Codecvt* pcvt = new Codecvt, + wbuffer_convert() : wbuffer_convert(nullptr) {} + explicit wbuffer_convert(streambuf* bytebuf, Codecvt* pcvt = new Codecvt, state_type state = state_type()); // explicit in C++14 wbuffer_convert(const wbuffer_convert&) = delete; // C++14 wbuffer_convert & operator=(const wbuffer_convert &) = delete; // C++14 ~wbuffer_convert(); // C++14 - + streambuf* rdbuf() const; streambuf* rdbuf(streambuf* bytebuf); @@ -3660,8 +3662,9 @@ wstring_convert(const wstring_convert& __wc); wstring_convert& operator=(const wstring_convert& __wc); public: + _LIBCPP_INLINE_VISIBILITY wstring_convert() : wstring_convert(new _Codecvt) {} _LIBCPP_INLINE_VISIBILITY - _LIBCPP_EXPLICIT_AFTER_CXX11 wstring_convert(_Codecvt* __pcvt = new _Codecvt); + _LIBCPP_EXPLICIT_AFTER_CXX11 wstring_convert(_Codecvt* __pcvt); _LIBCPP_INLINE_VISIBILITY wstring_convert(_Codecvt* __pcvt, state_type __state); _LIBCPP_EXPLICIT_AFTER_CXX11 wstring_convert(const byte_string& __byte_err, @@ -3929,7 +3932,8 @@ wbuffer_convert(const wbuffer_convert&); wbuffer_convert& operator=(const wbuffer_convert&); public: - _LIBCPP_EXPLICIT_AFTER_CXX11 wbuffer_convert(streambuf* __bytebuf = 0, + _LIBCPP_INLINE_VISIBILITY wbuffer_convert() : wbuffer_convert(nullptr) {} + _LIBCPP_EXPLICIT_AFTER_CXX11 wbuffer_convert(streambuf* __bytebuf, _Codecvt* __pcvt = new _Codecvt, state_type __state = state_type()); ~wbuffer_convert(); @@ -4044,7 +4048,7 @@ this->egptr(), __inext); if (__r == codecvt_base::noconv) { - this->setg((char_type*)__extbuf_, (char_type*)__extbuf_, + this->setg((char_type*)__extbuf_, (char_type*)__extbuf_, (char_type*) const_cast(__extbufend_)); __c = *this->gptr(); } Index: include/queue =================================================================== --- include/queue +++ include/queue @@ -70,8 +70,8 @@ template queue(Container) -> queue; // C++17 - -template + +template queue(Container, Allocator) -> queue; // C++17 template @@ -115,6 +115,8 @@ priority_queue() = default; ~priority_queue() = default; + explicit priority_queue(const Compare& x) : priority_queue(x, Container()) {} + priority_queue(const priority_queue& q) = default; priority_queue(priority_queue&& q) = default; @@ -165,13 +167,13 @@ template priority_queue(Compare, Container) -> priority_queue; // C++17 - -template::value_type>, class Container = vector::value_type>> priority_queue(InputIterator, InputIterator, Compare = Compare(), Container = Container()) -> priority_queue::value_type, Container, Compare>; // C++17 - + template priority_queue(Compare, Container, Allocator) -> priority_queue; // C++17 @@ -227,7 +229,7 @@ _LIBCPP_INLINE_VISIBILITY queue() _NOEXCEPT_(is_nothrow_default_constructible::value) - : c() {} + : queue(_Container()) {} _LIBCPP_INLINE_VISIBILITY queue(const queue& __q) : c(__q.c) {} @@ -346,7 +348,7 @@ > queue(_Container) -> queue; - + template::value, nullptr_t>::type, @@ -444,7 +446,13 @@ priority_queue() _NOEXCEPT_(is_nothrow_default_constructible::value && is_nothrow_default_constructible::value) - : c(), comp() {} + : priority_queue(_Compare()) {} + + _LIBCPP_INLINE_VISIBILITY + explicit priority_queue(const _Compare& __x) + _NOEXCEPT_(is_nothrow_default_constructible::value && + is_nothrow_default_constructible::value) + : priority_queue(__x, _Container()) {} _LIBCPP_INLINE_VISIBILITY priority_queue(const priority_queue& __q) : c(__q.c), comp(__q.comp) {} @@ -468,13 +476,10 @@ #endif // _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY - explicit priority_queue(const value_compare& __comp) - : c(), comp(__comp) {} - _LIBCPP_INLINE_VISIBILITY priority_queue(const value_compare& __comp, const container_type& __c); #ifndef _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY - explicit priority_queue(const value_compare& __comp, container_type&& __c); + priority_queue(const value_compare& __comp, container_type&& __c); #endif template _LIBCPP_INLINE_VISIBILITY @@ -558,8 +563,8 @@ > priority_queue(_Compare, _Container) -> priority_queue; - -template::value_type>, class _Container = vector::value_type>, class = typename enable_if< __is_input_iterator<_InputIterator>::value, nullptr_t>::type, @@ -568,8 +573,8 @@ > priority_queue(_InputIterator, _InputIterator, _Compare = _Compare(), _Container = _Container()) -> priority_queue::value_type, _Container, _Compare>; - -template::value, nullptr_t>::type, Index: include/random =================================================================== --- include/random +++ include/random @@ -36,7 +36,8 @@ static constexpr result_type default_seed = 1u; // constructors and seeding functions - explicit linear_congruential_engine(result_type s = default_seed); + linear_congruential_engine() : linear_congruential_engine(default_seed) {} + explicit linear_congruential_engine(result_type s); template explicit linear_congruential_engine(Sseq& q); void seed(result_type s = default_seed); template void seed(Sseq& q); @@ -96,7 +97,8 @@ static constexpr result_type default_seed = 5489u; // constructors and seeding functions - explicit mersenne_twister_engine(result_type value = default_seed); + mersenne_twister_engine() : mersenne_twister_engine(default_seed) {} + explicit mersenne_twister_engine(result_type value); template explicit mersenne_twister_engine(Sseq& q); void seed(result_type value = default_seed); template void seed(Sseq& q); @@ -154,7 +156,8 @@ static constexpr result_type default_seed = 19780503u; // constructors and seeding functions - explicit subtract_with_carry_engine(result_type value = default_seed); + subtract_with_carry_engine() : subtract_with_carry_engine(default_seed) {} + explicit subtract_with_carry_engine(result_type value); template explicit subtract_with_carry_engine(Sseq& q); void seed(result_type value = default_seed); template void seed(Sseq& q); @@ -385,7 +388,8 @@ static constexpr result_type max() { return numeric_limits::max(); } // constructors - explicit random_device(const string& token = "/dev/urandom"); + random_device() : random_device("/dev/urandom") {} + explicit random_device(const string& token); // generating functions result_type operator()(); @@ -455,7 +459,8 @@ }; // constructors and reset functions - explicit uniform_int_distribution(IntType a = 0, + uniform_int_distribution() : uniform_int_distribution(0) {} + explicit uniform_int_distribution(IntType a, IntType b = numeric_limits::max()); explicit uniform_int_distribution(const param_type& parm); void reset(); @@ -515,7 +520,8 @@ }; // constructors and reset functions - explicit uniform_real_distribution(RealType a = 0.0, RealType b = 1.0); + uniform_real_distribution() : uniform_real_distribution(0.0) {} + explicit uniform_real_distribution(RealType a, RealType b = 1.0); explicit uniform_real_distribution(const param_type& parm); void reset(); @@ -571,7 +577,8 @@ }; // constructors and reset functions - explicit bernoulli_distribution(double p = 0.5); + bernoulli_distribution() : bernoulli_distribution(0.5) {} + explicit bernoulli_distribution(double p); explicit bernoulli_distribution(const param_type& parm); void reset(); @@ -628,7 +635,8 @@ }; // constructors and reset functions - explicit binomial_distribution(IntType t = 1, double p = 0.5); + binomial_distribution() : binomial_distribution(1) {} + explicit binomial_distribution(IntType t, double p = 0.5); explicit binomial_distribution(const param_type& parm); void reset(); @@ -685,7 +693,8 @@ }; // constructors and reset functions - explicit geometric_distribution(double p = 0.5); + geometric_distribution() : geometric_distribution(0.5) {} + explicit geometric_distribution(double p); explicit geometric_distribution(const param_type& parm); void reset(); @@ -742,7 +751,8 @@ }; // constructor and reset functions - explicit negative_binomial_distribution(result_type k = 1, double p = 0.5); + negative_binomial_distribution() : negative_binomial_distribution(1) {} + explicit negative_binomial_distribution(result_type k, double p = 0.5); explicit negative_binomial_distribution(const param_type& parm); void reset(); @@ -799,7 +809,8 @@ }; // constructors and reset functions - explicit poisson_distribution(double mean = 1.0); + poisson_distribution() : poisson_distribution(1.0) {} + explicit poisson_distribution(double mean); explicit poisson_distribution(const param_type& parm); void reset(); @@ -855,7 +866,8 @@ }; // constructors and reset functions - explicit exponential_distribution(result_type lambda = 1.0); + exponential_distribution() : exponential_distribution(1.0) {} + explicit exponential_distribution(result_type lambda); explicit exponential_distribution(const param_type& parm); void reset(); @@ -912,7 +924,8 @@ }; // constructors and reset functions - explicit gamma_distribution(result_type alpha = 1, result_type beta = 1); + gamma_distribution() : gamma_distribution(1.0) {} + explicit gamma_distribution(result_type alpha, result_type beta = 1); explicit gamma_distribution(const param_type& parm); void reset(); @@ -970,7 +983,8 @@ }; // constructor and reset functions - explicit weibull_distribution(result_type a = 1, result_type b = 1); + weibull_distribution() : weibull_distribution(1.0) {} + explicit weibull_distribution(result_type a, result_type b = 1); explicit weibull_distribution(const param_type& parm); void reset(); @@ -1028,7 +1042,8 @@ }; // constructor and reset functions - explicit extreme_value_distribution(result_type a = 0, result_type b = 1); + extreme_value_distribution() : extreme_value_distribution(0.0) {} + explicit extreme_value_distribution(result_type a, result_type b = 1); explicit extreme_value_distribution(const param_type& parm); void reset(); @@ -1086,7 +1101,8 @@ }; // constructors and reset functions - explicit normal_distribution(result_type mean = 0, result_type stddev = 1); + normal_distribution() : normal_distribution(0.0) {} + explicit normal_distribution(result_type mean, result_type stddev = 1); explicit normal_distribution(const param_type& parm); void reset(); @@ -1144,7 +1160,8 @@ }; // constructor and reset functions - explicit lognormal_distribution(result_type m = 0, result_type s = 1); + lognormal_distribution() : lognormal_distribution(0.0) {} + explicit lognormal_distribution(result_type m, result_type s = 1); explicit lognormal_distribution(const param_type& parm); void reset(); @@ -1201,7 +1218,8 @@ }; // constructor and reset functions - explicit chi_squared_distribution(result_type n = 1); + chi_squared_distribution() : chi_squared_distribution(1) {} + explicit chi_squared_distribution(result_type n); explicit chi_squared_distribution(const param_type& parm); void reset(); @@ -1258,7 +1276,8 @@ }; // constructor and reset functions - explicit cauchy_distribution(result_type a = 0, result_type b = 1); + cauchy_distribution() : cauchy_distribution(0.0) {} + explicit cauchy_distribution(result_type a, result_type b = 1); explicit cauchy_distribution(const param_type& parm); void reset(); @@ -1316,7 +1335,8 @@ }; // constructor and reset functions - explicit fisher_f_distribution(result_type m = 1, result_type n = 1); + fisher_f_distribution() : fisher_f_distribution(1) {} + explicit fisher_f_distribution(result_type m, result_type n = 1); explicit fisher_f_distribution(const param_type& parm); void reset(); @@ -1373,7 +1393,8 @@ }; // constructor and reset functions - explicit student_t_distribution(result_type n = 1); + student_t_distribution() : student_t_distribution(1) {} + explicit student_t_distribution(result_type n); explicit student_t_distribution(const param_type& parm); void reset(); @@ -1860,7 +1881,10 @@ // constructors and seeding functions _LIBCPP_INLINE_VISIBILITY - explicit linear_congruential_engine(result_type __s = default_seed) + linear_congruential_engine() : linear_congruential_engine(default_seed) {} + + _LIBCPP_INLINE_VISIBILITY + explicit linear_congruential_engine(result_type __s) {seed(__s);} template _LIBCPP_INLINE_VISIBILITY @@ -2107,7 +2131,10 @@ // constructors and seeding functions _LIBCPP_INLINE_VISIBILITY - explicit mersenne_twister_engine(result_type __sd = default_seed) + mersenne_twister_engine() : mersenne_twister_engine(default_seed) {} + + _LIBCPP_INLINE_VISIBILITY + explicit mersenne_twister_engine(result_type __sd) {seed(__sd);} template _LIBCPP_INLINE_VISIBILITY @@ -2226,19 +2253,19 @@ template - _LIBCPP_CONSTEXPR const size_t + _LIBCPP_CONSTEXPR const size_t mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::state_size; template - _LIBCPP_CONSTEXPR const size_t + _LIBCPP_CONSTEXPR const size_t mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::shift_size; template - _LIBCPP_CONSTEXPR const size_t + _LIBCPP_CONSTEXPR const size_t mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::mask_bits; template - _LIBCPP_CONSTEXPR const size_t + _LIBCPP_CONSTEXPR const size_t mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::tempering_u; template - _LIBCPP_CONSTEXPR const size_t + _LIBCPP_CONSTEXPR const size_t mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::tempering_s; template - _LIBCPP_CONSTEXPR const size_t + _LIBCPP_CONSTEXPR const size_t mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::tempering_t; template - _LIBCPP_CONSTEXPR const size_t + _LIBCPP_CONSTEXPR const size_t mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::tempering_l; template _LIBCPP_INLINE_VISIBILITY @@ -3496,7 +3526,9 @@ static _LIBCPP_CONSTEXPR result_type max() { return _Max;} // constructors - explicit random_device(const string& __token = "/dev/urandom"); + random_device() : random_device("/dev/urandom") {} + + explicit random_device(const string& __token); ~random_device(); // generating functions @@ -3727,7 +3759,10 @@ public: // constructors and reset functions _LIBCPP_INLINE_VISIBILITY - explicit uniform_real_distribution(result_type __a = 0, result_type __b = 1) + uniform_real_distribution() : uniform_real_distribution(0) {} + + _LIBCPP_INLINE_VISIBILITY + explicit uniform_real_distribution(result_type __a, result_type __b = 1) : __p_(param_type(__a, __b)) {} _LIBCPP_INLINE_VISIBILITY explicit uniform_real_distribution(const param_type& __p) : __p_(__p) {} @@ -3843,7 +3878,10 @@ public: // constructors and reset functions _LIBCPP_INLINE_VISIBILITY - explicit bernoulli_distribution(double __p = 0.5) + bernoulli_distribution() : bernoulli_distribution(0.5) {} + + _LIBCPP_INLINE_VISIBILITY + explicit bernoulli_distribution(double __p) : __p_(param_type(__p)) {} _LIBCPP_INLINE_VISIBILITY explicit bernoulli_distribution(const param_type& __p) : __p_(__p) {} @@ -3959,7 +3997,10 @@ public: // constructors and reset functions _LIBCPP_INLINE_VISIBILITY - explicit binomial_distribution(result_type __t = 1, double __p = 0.5) + binomial_distribution() : binomial_distribution(1) {} + + _LIBCPP_INLINE_VISIBILITY + explicit binomial_distribution(result_type __t, double __p = 0.5) : __p_(param_type(__t, __p)) {} _LIBCPP_INLINE_VISIBILITY explicit binomial_distribution(const param_type& __p) : __p_(__p) {} @@ -4132,9 +4173,12 @@ param_type __p_; public: + _LIBCPP_INLINE_VISIBILITY + exponential_distribution() : exponential_distribution(1) {} + // constructors and reset functions _LIBCPP_INLINE_VISIBILITY - explicit exponential_distribution(result_type __lambda = 1) + explicit exponential_distribution(result_type __lambda) : __p_(param_type(__lambda)) {} _LIBCPP_INLINE_VISIBILITY explicit exponential_distribution(const param_type& __p) : __p_(__p) {} @@ -4255,7 +4299,10 @@ public: // constructors and reset functions _LIBCPP_INLINE_VISIBILITY - explicit normal_distribution(result_type __mean = 0, result_type __stddev = 1) + normal_distribution() : normal_distribution(0) {} + + _LIBCPP_INLINE_VISIBILITY + explicit normal_distribution(result_type __mean, result_type __stddev = 1) : __p_(param_type(__mean, __stddev)), _V_hot_(false) {} _LIBCPP_INLINE_VISIBILITY explicit normal_distribution(const param_type& __p) @@ -4433,7 +4480,10 @@ public: // constructor and reset functions _LIBCPP_INLINE_VISIBILITY - explicit lognormal_distribution(result_type __m = 0, result_type __s = 1) + lognormal_distribution() : lognormal_distribution(0.0) {} + + _LIBCPP_INLINE_VISIBILITY + explicit lognormal_distribution(result_type __m, result_type __s = 1) : __p_(param_type(__m, __s)) {} _LIBCPP_INLINE_VISIBILITY explicit lognormal_distribution(const param_type& __p) @@ -4553,7 +4603,10 @@ public: // constructors and reset functions _LIBCPP_INLINE_VISIBILITY - explicit poisson_distribution(double __mean = 1.0) : __p_(__mean) {} + poisson_distribution() : poisson_distribution(1) {} + + _LIBCPP_INLINE_VISIBILITY + explicit poisson_distribution(double __mean) : __p_(__mean) {} _LIBCPP_INLINE_VISIBILITY explicit poisson_distribution(const param_type& __p) : __p_(__p) {} _LIBCPP_INLINE_VISIBILITY @@ -4777,7 +4830,10 @@ public: // constructor and reset functions _LIBCPP_INLINE_VISIBILITY - explicit weibull_distribution(result_type __a = 1, result_type __b = 1) + weibull_distribution() : weibull_distribution(1) {} + + _LIBCPP_INLINE_VISIBILITY + explicit weibull_distribution(result_type __a, result_type __b = 1) : __p_(param_type(__a, __b)) {} _LIBCPP_INLINE_VISIBILITY explicit weibull_distribution(const param_type& __p) @@ -4891,7 +4947,10 @@ public: // constructor and reset functions _LIBCPP_INLINE_VISIBILITY - explicit extreme_value_distribution(result_type __a = 0, result_type __b = 1) + extreme_value_distribution() : extreme_value_distribution(0) {} + + _LIBCPP_INLINE_VISIBILITY + explicit extreme_value_distribution(result_type __a, result_type __b = 1) : __p_(param_type(__a, __b)) {} _LIBCPP_INLINE_VISIBILITY explicit extreme_value_distribution(const param_type& __p) @@ -5010,9 +5069,12 @@ param_type __p_; public: + _LIBCPP_INLINE_VISIBILITY + gamma_distribution() :gamma_distribution(1) {} + // constructors and reset functions _LIBCPP_INLINE_VISIBILITY - explicit gamma_distribution(result_type __alpha = 1, result_type __beta = 1) + explicit gamma_distribution(result_type __alpha, result_type __beta = 1) : __p_(param_type(__alpha, __beta)) {} _LIBCPP_INLINE_VISIBILITY explicit gamma_distribution(const param_type& __p) @@ -5184,7 +5246,10 @@ public: // constructor and reset functions _LIBCPP_INLINE_VISIBILITY - explicit negative_binomial_distribution(result_type __k = 1, double __p = 0.5) + negative_binomial_distribution() : negative_binomial_distribution(1) {} + + _LIBCPP_INLINE_VISIBILITY + explicit negative_binomial_distribution(result_type __k, double __p = 0.5) : __p_(__k, __p) {} _LIBCPP_INLINE_VISIBILITY explicit negative_binomial_distribution(const param_type& __p) : __p_(__p) {} @@ -5313,9 +5378,12 @@ param_type __p_; public: + _LIBCPP_INLINE_VISIBILITY + geometric_distribution() : geometric_distribution(0.5) {} + // constructors and reset functions _LIBCPP_INLINE_VISIBILITY - explicit geometric_distribution(double __p = 0.5) : __p_(__p) {} + explicit geometric_distribution(double __p) : __p_(__p) {} _LIBCPP_INLINE_VISIBILITY explicit geometric_distribution(const param_type& __p) : __p_(__p) {} _LIBCPP_INLINE_VISIBILITY @@ -5417,7 +5485,10 @@ public: // constructor and reset functions _LIBCPP_INLINE_VISIBILITY - explicit chi_squared_distribution(result_type __n = 1) + chi_squared_distribution() : chi_squared_distribution(1) {} + + _LIBCPP_INLINE_VISIBILITY + explicit chi_squared_distribution(result_type __n) : __p_(param_type(__n)) {} _LIBCPP_INLINE_VISIBILITY explicit chi_squared_distribution(const param_type& __p) @@ -5527,7 +5598,10 @@ public: // constructor and reset functions _LIBCPP_INLINE_VISIBILITY - explicit cauchy_distribution(result_type __a = 0, result_type __b = 1) + cauchy_distribution() : cauchy_distribution(0) {} + + _LIBCPP_INLINE_VISIBILITY + explicit cauchy_distribution(result_type __a, result_type __b = 1) : __p_(param_type(__a, __b)) {} _LIBCPP_INLINE_VISIBILITY explicit cauchy_distribution(const param_type& __p) @@ -5650,7 +5724,10 @@ public: // constructor and reset functions _LIBCPP_INLINE_VISIBILITY - explicit fisher_f_distribution(result_type __m = 1, result_type __n = 1) + fisher_f_distribution() : fisher_f_distribution(1) {} + + _LIBCPP_INLINE_VISIBILITY + explicit fisher_f_distribution(result_type __m, result_type __n = 1) : __p_(param_type(__m, __n)) {} _LIBCPP_INLINE_VISIBILITY explicit fisher_f_distribution(const param_type& __p) @@ -5769,7 +5846,10 @@ public: // constructor and reset functions _LIBCPP_INLINE_VISIBILITY - explicit student_t_distribution(result_type __n = 1) + student_t_distribution() : student_t_distribution(1) {} + + _LIBCPP_INLINE_VISIBILITY + explicit student_t_distribution(result_type __n) : __p_(param_type(__n)) {} _LIBCPP_INLINE_VISIBILITY explicit student_t_distribution(const param_type& __p) @@ -6426,7 +6506,7 @@ param_type(size_t __nw, result_type __xmin, result_type __xmax, _UnaryOperation __fw); param_type & operator=(const param_type& __rhs); - + _LIBCPP_INLINE_VISIBILITY vector intervals() const {return __b_;} _LIBCPP_INLINE_VISIBILITY Index: include/regex =================================================================== --- include/regex +++ include/regex @@ -453,7 +453,8 @@ typedef basic_string string_type; // construct/copy/destroy: - explicit match_results(const Allocator& a = Allocator()); + match_results() : match_results(Allocator()) {} + explicit match_results(const Allocator& a); match_results(const match_results& m); match_results(match_results&& m) noexcept; match_results& operator=(const match_results& m); @@ -677,7 +678,7 @@ regex_constants::match_flag_type m = regex_constants::match_default); regex_iterator(_BidirectionalIterator __a, _BidirectionalIterator __b, const regex_type&& __re, - regex_constants::match_flag_type __m + regex_constants::match_flag_type __m = regex_constants::match_default) = delete; // C++14 regex_iterator(const regex_iterator&); regex_iterator& operator=(const regex_iterator&); @@ -3410,7 +3411,7 @@ if (__temp != __last) { if (*__first == '\\') - { + { int __val = __traits_.value(*__temp, 10); if (__val >= 1 && __val <= 9) { @@ -4107,7 +4108,7 @@ if ( __val != -1 ) { __c = __val; - for (++__first; + for (++__first; __first != __last && ( __val = __traits_.value(*__first, 10)) != -1; ++__first) { @@ -4487,7 +4488,7 @@ case 'c': if ((__t = _VSTD::next(__first)) != __last) { - if (('A' <= *__t && *__t <= 'Z') || + if (('A' <= *__t && *__t <= 'Z') || ('a' <= *__t && *__t <= 'z')) { if (__str) @@ -4496,7 +4497,7 @@ __push_char(_CharT(*__t % 32)); __first = ++__t; } - else + else __throw_regex_error(); } else @@ -5275,7 +5276,8 @@ typedef basic_string string_type; // construct/copy/destroy: - explicit match_results(const allocator_type& __a = allocator_type()); + match_results() : match_results(allocator_type()) {} + explicit match_results(const allocator_type& __a); // match_results(const match_results&) = default; // match_results& operator=(const match_results&) = default; // match_results(match_results&& __m) = default; @@ -5897,7 +5899,7 @@ { __m.__init(1 + mark_count(), __first, __last, __flags & regex_constants::__no_update_pos); - if (__match_at_start(__first, __last, __m, __flags, + if (__match_at_start(__first, __last, __m, __flags, !(__flags & regex_constants::__no_update_pos))) { __m.__prefix_.second = __m[0].first; @@ -6043,7 +6045,7 @@ regex_search(const basic_string<_Cp, _ST, _SA>&& __s, match_results::const_iterator, _Ap>&, const basic_regex<_Cp, _Tp>& __e, - regex_constants::match_flag_type __flags = regex_constants::match_default) = delete; + regex_constants::match_flag_type __flags = regex_constants::match_default) = delete; #endif // regex_match @@ -6107,7 +6109,7 @@ regex_match(const basic_string<_CharT, _ST, _SA>&& __s, match_results::const_iterator, _Allocator>& __m, const basic_regex<_CharT, _Traits>& __e, - regex_constants::match_flag_type __flags = regex_constants::match_default) = delete; + regex_constants::match_flag_type __flags = regex_constants::match_default) = delete; #endif template @@ -6160,7 +6162,7 @@ #if _LIBCPP_STD_VER > 11 regex_iterator(_BidirectionalIterator __a, _BidirectionalIterator __b, const regex_type&& __re, - regex_constants::match_flag_type __m + regex_constants::match_flag_type __m = regex_constants::match_default) = delete; #endif @@ -6356,7 +6358,7 @@ __result_ = &__position_->prefix(); else __result_ = &(*__position_)[__subs_[__n_]]; - } + } }; template Index: include/sstream =================================================================== --- include/sstream +++ include/sstream @@ -26,7 +26,8 @@ typedef Allocator allocator_type; // 27.8.1.1 Constructors: - explicit basic_stringbuf(ios_base::openmode which = ios_base::in | ios_base::out); + basic_stringbuf() : basic_stringbuf(ios_base::in | ios_base::out) {} + explicit basic_stringbuf(ios_base::openmode which); explicit basic_stringbuf(const basic_string& str, ios_base::openmode which = ios_base::in | ios_base::out); basic_stringbuf(basic_stringbuf&& rhs); @@ -71,7 +72,8 @@ typedef Allocator allocator_type; // 27.8.2.1 Constructors: - explicit basic_istringstream(ios_base::openmode which = ios_base::in); + basic_istringstream() : basic_istringstream(ios_base::in) {} + explicit basic_istringstream(ios_base::openmode which); explicit basic_istringstream(const basic_string& str, ios_base::openmode which = ios_base::in); basic_istringstream(basic_istringstream&& rhs); @@ -107,7 +109,8 @@ typedef Allocator allocator_type; // 27.8.3.1 Constructors/destructor: - explicit basic_ostringstream(ios_base::openmode which = ios_base::out); + basic_ostringstream() : basic_ostringstream(ios_base::out) {} + explicit basic_ostringstream(ios_base::openmode which); explicit basic_ostringstream(const basic_string& str, ios_base::openmode which = ios_base::out); basic_ostringstream(basic_ostringstream&& rhs); @@ -143,7 +146,8 @@ typedef Allocator allocator_type; // constructors/destructor - explicit basic_stringstream(ios_base::openmode which = ios_base::out|ios_base::in); + basic_stringstream() : basic_stringstream(ios_base::out | ios_base::in) {} + explicit basic_stringstream(ios_base::openmode which); explicit basic_stringstream(const basic_string& str, ios_base::openmode which = ios_base::out|ios_base::in); basic_stringstream(basic_stringstream&& rhs); @@ -208,8 +212,10 @@ public: // 27.8.1.1 Constructors: + _LIBCPP_INLINE_VISIBILITY + basic_stringbuf() : basic_stringbuf(ios_base::in | ios_base::out) {} inline _LIBCPP_INLINE_VISIBILITY - explicit basic_stringbuf(ios_base::openmode __wch = ios_base::in | ios_base::out); + explicit basic_stringbuf(ios_base::openmode __wch); inline _LIBCPP_INLINE_VISIBILITY explicit basic_stringbuf(const string_type& __s, ios_base::openmode __wch = ios_base::in | ios_base::out); @@ -644,8 +650,9 @@ public: // 27.8.2.1 Constructors: + inline _LIBCPP_INLINE_VISIBILITY basic_istringstream() : basic_istringstream(ios_base::in) {} inline _LIBCPP_INLINE_VISIBILITY - explicit basic_istringstream(ios_base::openmode __wch = ios_base::in); + explicit basic_istringstream(ios_base::openmode __wch); inline _LIBCPP_INLINE_VISIBILITY explicit basic_istringstream(const string_type& __s, ios_base::openmode __wch = ios_base::in); @@ -762,7 +769,9 @@ public: // 27.8.2.1 Constructors: inline _LIBCPP_INLINE_VISIBILITY - explicit basic_ostringstream(ios_base::openmode __wch = ios_base::out); + basic_ostringstream() : basic_ostringstream(ios_base::out) {} + inline _LIBCPP_INLINE_VISIBILITY + explicit basic_ostringstream(ios_base::openmode __wch); inline _LIBCPP_INLINE_VISIBILITY explicit basic_ostringstream(const string_type& __s, ios_base::openmode __wch = ios_base::out); @@ -881,7 +890,9 @@ public: // 27.8.2.1 Constructors: inline _LIBCPP_INLINE_VISIBILITY - explicit basic_stringstream(ios_base::openmode __wch = ios_base::in | ios_base::out); + basic_stringstream() : basic_stringstream(ios_base::in | ios_base::out) {} + inline _LIBCPP_INLINE_VISIBILITY + explicit basic_stringstream(ios_base::openmode __wch); inline _LIBCPP_INLINE_VISIBILITY explicit basic_stringstream(const string_type& __s, ios_base::openmode __wch = ios_base::in | ios_base::out); Index: include/stack =================================================================== --- include/stack +++ include/stack @@ -39,6 +39,7 @@ stack& operator=(const stack& q) = default; stack& operator=(stack&& q) = default; + stack() : stack(Container()) {} explicit stack(const container_type& c); explicit stack(container_type&& c); template explicit stack(const Alloc& a); @@ -62,8 +63,8 @@ template stack(Container) -> stack; // C++17 - -template + +template stack(Container, Allocator) -> stack; // C++17 template @@ -118,7 +119,7 @@ typedef typename container_type::const_reference const_reference; typedef typename container_type::size_type size_type; static_assert((is_same<_Tp, value_type>::value), "" ); - + protected: container_type c; @@ -126,7 +127,7 @@ _LIBCPP_INLINE_VISIBILITY stack() _NOEXCEPT_(is_nothrow_default_constructible::value) - : c() {} + : stack(_Container()) {} _LIBCPP_INLINE_VISIBILITY stack(const stack& __q) : c(__q.c) {} @@ -240,12 +241,12 @@ > stack(_Container) -> stack; - + template::value, nullptr_t>::type, class = typename enable_if< __is_allocator<_Alloc>::value, nullptr_t>::type - > + > stack(_Container, _Alloc) -> stack; #endif Index: include/string =================================================================== --- include/string +++ include/string @@ -627,13 +627,13 @@ #else template ::value> struct __libcpp_string_gets_noexcept_iterator_impl : public _LIBCPP_BOOL_CONSTANT(( - noexcept(++(declval<_Iter&>())) && - is_nothrow_assignable<_Iter&, _Iter>::value && - noexcept(declval<_Iter>() == declval<_Iter>()) && + noexcept(++(declval<_Iter&>())) && + is_nothrow_assignable<_Iter&, _Iter>::value && + noexcept(declval<_Iter>() == declval<_Iter>()) && noexcept(*declval<_Iter>()) )) {}; -template +template struct __libcpp_string_gets_noexcept_iterator_impl<_Iter, false> : public false_type {}; #endif @@ -1420,7 +1420,7 @@ _LIBCPP_INLINE_VISIBILITY bool __invariants() const; _LIBCPP_INLINE_VISIBILITY void __clear_and_shrink() _NOEXCEPT; - + _LIBCPP_INLINE_VISIBILITY bool __is_long() const _NOEXCEPT {return bool(__r_.first().__s.__size_ & __short_mask);} @@ -1682,7 +1682,7 @@ -> basic_string<_CharT, _Traits, _Allocator>; #endif - + template inline void @@ -2525,7 +2525,7 @@ const basic_string __temp (__first, __last, __alloc()); append(__temp.data(), __temp.size()); } - else + else { if (__cap - __sz < __n) __grow_by(__cap, __sz + __n - __cap, __sz, __sz, 0); @@ -3824,7 +3824,7 @@ template inline -void +void basic_string<_CharT, _Traits, _Allocator>::__clear_and_shrink() _NOEXCEPT { clear(); @@ -3834,7 +3834,7 @@ __set_long_cap(0); __set_short_size(0); } -} +} // operator== @@ -4331,7 +4331,7 @@ _LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_string) _LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_string) -#if _LIBCPP_STD_VER > 11 +#if _LIBCPP_STD_VER > 11 // Literal suffixes for basic_string [basic.string.literals] inline namespace literals { Index: include/strstream =================================================================== --- include/strstream +++ include/strstream @@ -17,7 +17,8 @@ : public basic_streambuf { public: - explicit strstreambuf(streamsize alsize_arg = 0); + strstreambuf() : strstreambuf(0) {} + explicit strstreambuf(streamsize alsize_arg); strstreambuf(void* (*palloc_arg)(size_t), void (*pfree_arg)(void*)); strstreambuf(char* gnext_arg, streamsize n, char* pbeg_arg = 0); strstreambuf(const char* gnext_arg, streamsize n); @@ -140,7 +141,8 @@ : public streambuf { public: - explicit strstreambuf(streamsize __alsize = 0); + strstreambuf() : strstreambuf(0) {} + explicit strstreambuf(streamsize __alsize); strstreambuf(void* (*__palloc)(size_t), void (*__pfree)(void*)); strstreambuf(char* __gnext, streamsize __n, char* __pbeg = 0); strstreambuf(const char* __gnext, streamsize __n); Index: lib/CMakeLists.txt =================================================================== --- lib/CMakeLists.txt +++ lib/CMakeLists.txt @@ -198,6 +198,8 @@ set(RE_EXPORT_LIST "${CMAKE_CURRENT_SOURCE_DIR}/libc++abi.v${LIBCXX_LIBCPPABI_VERSION}.exp") endif() target_link_libraries(cxx_shared PRIVATE + "-compatibility_version 1" + "-install_name /usr/lib/libc++.1.dylib" "-Wl,-unexported_symbols_list,${CMAKE_CURRENT_SOURCE_DIR}/libc++unexp.exp" "-Wl,-reexported_symbols_list,${RE_EXPORT_LIST}" "-Wl,-force_symbols_not_weak_list,${CMAKE_CURRENT_SOURCE_DIR}/notweak.exp" Index: www/cxx2a_status.html =================================================================== --- www/cxx2a_status.html +++ www/cxx2a_status.html @@ -100,7 +100,7 @@ P0887R1LWGThe identity metafunctionRapperswilComplete8.0 P0892R2CWGexplicit(bool)Rapperswil P0898R3LWGStandard Library ConceptsRapperswil - P0935R0LWGEradicating unnecessarily explicit default constructors from the standard libraryRapperswil + P0935R0LWGEradicating unnecessarily explicit default constructors from the standard libraryRapperswilComplete P0941R2CWGIntegrating feature-test macros into the C++ WDRapperswilIn progress P1023R0LWGconstexpr comparison operators for std::arrayRapperswilComplete8.0 P1025R1CWGUpdate The Reference To The Unicode StandardRapperswil