diff --git a/libcxx/include/chrono b/libcxx/include/chrono index 0ee8c32d7343..1b907571aa14 100644 --- a/libcxx/include/chrono +++ b/libcxx/include/chrono @@ -1934,7 +1934,7 @@ bool operator!=(const weekday_last& __lhs, const weekday_last& __rhs) noexcept inline constexpr weekday_indexed weekday::operator[](unsigned __index) const noexcept { return weekday_indexed{*this, __index}; } -inline constexpr +inline constexpr weekday_last weekday::operator[](last_spec) const noexcept { return weekday_last{*this}; } @@ -2245,7 +2245,7 @@ public: year_month_day() = default; inline constexpr year_month_day( const chrono::year& __yval, const chrono::month& __mval, const chrono::day& __dval) noexcept - : __y{__yval}, __m{__mval}, __d{__dval} {} + : __y{__yval}, __m{__mval}, __d{__dval} {} constexpr year_month_day(const year_month_day_last& __ymdl) noexcept; inline constexpr year_month_day(const sys_days& __sysd) noexcept : year_month_day(__from_days(__sysd.time_since_epoch())) {} @@ -2500,7 +2500,7 @@ inline constexpr year_month_day_last& year_month_day_last::operator+=(const year inline constexpr year_month_day_last& year_month_day_last::operator-=(const years& __dy) noexcept { *this = *this - __dy; return *this; } inline constexpr year_month_day::year_month_day(const year_month_day_last& __ymdl) noexcept - : __y{__ymdl.year()}, __m{__ymdl.month()}, __d{__ymdl.day()} {} + : __y{__ymdl.year()}, __m{__ymdl.month()}, __d{__ymdl.day()} {} inline constexpr bool year_month_day::ok() const noexcept { @@ -2551,7 +2551,7 @@ year_month_weekday year_month_weekday::__from_days(days __d) noexcept const sys_days __sysd{__d}; const chrono::weekday __wd = chrono::weekday(__sysd); const year_month_day __ymd = year_month_day(__sysd); - return year_month_weekday{__ymd.year(), __ymd.month(), + return year_month_weekday{__ymd.year(), __ymd.month(), __wd[(static_cast(__ymd.day())-1)/7+1]}; } @@ -2643,9 +2643,9 @@ public: inline constexpr operator sys_days() const noexcept { return sys_days{__to_days()}; } inline explicit constexpr operator local_days() const noexcept { return local_days{__to_days()}; } inline constexpr bool ok() const noexcept { return __y.ok() && __m.ok() && __wdl.ok(); } - + constexpr days __to_days() const noexcept; - + }; inline constexpr @@ -2683,7 +2683,7 @@ year_month_weekday_last operator/(const month_weekday_last& __lhs, const year& _ inline constexpr year_month_weekday_last operator/(const month_weekday_last& __lhs, int __rhs) noexcept -{ return year(__rhs) / __lhs; } +{ return year(__rhs) / __lhs; } inline constexpr @@ -2795,7 +2795,7 @@ inline namespace literals { return chrono::day(static_cast(__d)); } - + constexpr chrono::year operator ""y(unsigned long long __y) noexcept { return chrono::year(static_cast(__y)); diff --git a/libcxx/include/complex b/libcxx/include/complex index ff702b4ffc7c..c168406befbd 100644 --- a/libcxx/include/complex +++ b/libcxx/include/complex @@ -1449,10 +1449,10 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, const complex<_Tp>& __x) return __os << __s.str(); } -#if _LIBCPP_STD_VER > 11 +#if _LIBCPP_STD_VER > 11 // Literal suffix for complex number literals [complex.literals] inline namespace literals -{ +{ inline namespace complex_literals { constexpr complex operator""il(long double __im) diff --git a/libcxx/include/forward_list b/libcxx/include/forward_list index b7ac0ddf2ce3..54021d0a03e8 100644 --- a/libcxx/include/forward_list +++ b/libcxx/include/forward_list @@ -530,7 +530,7 @@ public: #if _LIBCPP_STD_VER >= 14 _NOEXCEPT; #else - _NOEXCEPT_(!__node_traits::propagate_on_container_move_assignment::value || + _NOEXCEPT_(!__node_traits::propagate_on_container_move_assignment::value || __is_nothrow_swappable<__node_allocator>::value); #endif protected: @@ -595,11 +595,11 @@ __forward_list_base<_Tp, _Alloc>::swap(__forward_list_base& __x) #if _LIBCPP_STD_VER >= 14 _NOEXCEPT #else - _NOEXCEPT_(!__node_traits::propagate_on_container_move_assignment::value || + _NOEXCEPT_(!__node_traits::propagate_on_container_move_assignment::value || __is_nothrow_swappable<__node_allocator>::value) #endif { - __swap_allocator(__alloc(), __x.__alloc(), + __swap_allocator(__alloc(), __x.__alloc(), integral_constant()); using _VSTD::swap; swap(__before_begin()->__next_, __x.__before_begin()->__next_); diff --git a/libcxx/include/future b/libcxx/include/future index 50bdd2da2781..24396e72ac45 100644 --- a/libcxx/include/future +++ b/libcxx/include/future @@ -2015,7 +2015,7 @@ public: class = typename enable_if < !is_same< - typename __uncvref<_Fp>::type, + typename __uncvref<_Fp>::type, packaged_task >::value >::type @@ -2026,7 +2026,7 @@ public: class = typename enable_if < !is_same< - typename __uncvref<_Fp>::type, + typename __uncvref<_Fp>::type, packaged_task >::value >::type @@ -2144,7 +2144,7 @@ public: class = typename enable_if < !is_same< - typename __uncvref<_Fp>::type, + typename __uncvref<_Fp>::type, packaged_task >::value >::type @@ -2155,11 +2155,11 @@ public: class = typename enable_if < !is_same< - typename __uncvref<_Fp>::type, + typename __uncvref<_Fp>::type, packaged_task >::value >::type - > + > _LIBCPP_INLINE_VISIBILITY packaged_task(allocator_arg_t, const _Allocator& __a, _Fp&& __f) : __f_(allocator_arg, __a, _VSTD::forward<_Fp>(__f)), diff --git a/libcxx/include/initializer_list b/libcxx/include/initializer_list index 6c4493b70605..893736f57ead 100644 --- a/libcxx/include/initializer_list +++ b/libcxx/include/initializer_list @@ -82,7 +82,7 @@ public: _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 size_t size() const _NOEXCEPT {return __size_;} - + _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 const _Ep* begin() const _NOEXCEPT {return __begin_;} diff --git a/libcxx/include/iomanip b/libcxx/include/iomanip index 82b7603a348a..3f78f4d02b3c 100644 --- a/libcxx/include/iomanip +++ b/libcxx/include/iomanip @@ -515,7 +515,7 @@ put_time(const tm* __tm, const _CharT* __fmt) template std::basic_ostream<_CharT, _Traits> & -__quoted_output ( basic_ostream<_CharT, _Traits> &__os, +__quoted_output ( basic_ostream<_CharT, _Traits> &__os, _ForwardIterator __first, _ForwardIterator __last, _CharT __delim, _CharT __escape ) { _VSTD::basic_string<_CharT, _Traits> __str; @@ -570,7 +570,7 @@ __quoted_input ( basic_istream<_CharT, _Traits> &__is, _String & __string, _Char template basic_ostream<_CharT, _Traits>& operator<<( - basic_ostream<_CharT, _Traits>& __os, + basic_ostream<_CharT, _Traits>& __os, const __quoted_output_proxy<_CharT, _Iter, _Traits> & __proxy) { return __quoted_output (__os, __proxy.__first, __proxy.__last, __proxy.__delim, __proxy.__escape); @@ -590,7 +590,7 @@ struct __quoted_proxy template _LIBCPP_INLINE_VISIBILITY basic_ostream<_CharT, _Traits>& operator<<( - basic_ostream<_CharT, _Traits>& __os, + basic_ostream<_CharT, _Traits>& __os, const __quoted_proxy<_CharT, _Traits, _Allocator> & __proxy) { return __quoted_output (__os, __proxy.__string.cbegin (), __proxy.__string.cend (), __proxy.__delim, __proxy.__escape); @@ -600,7 +600,7 @@ basic_ostream<_CharT, _Traits>& operator<<( template _LIBCPP_INLINE_VISIBILITY basic_istream<_CharT, _Traits>& operator>>( - basic_istream<_CharT, _Traits>& __is, + basic_istream<_CharT, _Traits>& __is, const __quoted_proxy<_CharT, _Traits, _Allocator> & __proxy) { return __quoted_input ( __is, __proxy.__string, __proxy.__delim, __proxy.__escape ); @@ -660,7 +660,7 @@ __quoted_output_proxy<_CharT, const _CharT *, _Traits> quoted (basic_string_view <_CharT, _Traits> __sv, _CharT __delim = _CharT('"'), _CharT __escape=_CharT('\\')) { - return __quoted_output_proxy<_CharT, const _CharT *, _Traits> + return __quoted_output_proxy<_CharT, const _CharT *, _Traits> ( __sv.data(), __sv.data() + __sv.size(), __delim, __escape ); } #endif diff --git a/libcxx/include/ios b/libcxx/include/ios index ce4e1769f2fb..88efefb46ff2 100644 --- a/libcxx/include/ios +++ b/libcxx/include/ios @@ -202,8 +202,8 @@ enum class io_errc }; concept_map ErrorCodeEnum { }; -error_code make_error_code(io_errc e) noexcept; -error_condition make_error_condition(io_errc e) noexcept; +error_code make_error_code(io_errc e) noexcept; +error_condition make_error_condition(io_errc e) noexcept; storage-class-specifier const error_category& iostream_category() noexcept; } // std @@ -644,47 +644,47 @@ public: virtual ~basic_ios(); // 27.5.4.2 Members: - _LIBCPP_INLINE_VISIBILITY + _LIBCPP_INLINE_VISIBILITY basic_ostream* tie() const; - _LIBCPP_INLINE_VISIBILITY + _LIBCPP_INLINE_VISIBILITY basic_ostream* tie(basic_ostream* __tiestr); - _LIBCPP_INLINE_VISIBILITY + _LIBCPP_INLINE_VISIBILITY basic_streambuf* rdbuf() const; - _LIBCPP_INLINE_VISIBILITY + _LIBCPP_INLINE_VISIBILITY basic_streambuf* rdbuf(basic_streambuf* __sb); basic_ios& copyfmt(const basic_ios& __rhs); - _LIBCPP_INLINE_VISIBILITY + _LIBCPP_INLINE_VISIBILITY char_type fill() const; - _LIBCPP_INLINE_VISIBILITY + _LIBCPP_INLINE_VISIBILITY char_type fill(char_type __ch); - _LIBCPP_INLINE_VISIBILITY + _LIBCPP_INLINE_VISIBILITY locale imbue(const locale& __loc); - _LIBCPP_INLINE_VISIBILITY + _LIBCPP_INLINE_VISIBILITY char narrow(char_type __c, char __dfault) const; - _LIBCPP_INLINE_VISIBILITY + _LIBCPP_INLINE_VISIBILITY char_type widen(char __c) const; protected: _LIBCPP_INLINE_VISIBILITY basic_ios() {// purposefully does no initialization } - _LIBCPP_INLINE_VISIBILITY + _LIBCPP_INLINE_VISIBILITY void init(basic_streambuf* __sb); - _LIBCPP_INLINE_VISIBILITY + _LIBCPP_INLINE_VISIBILITY void move(basic_ios& __rhs); #ifndef _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY void move(basic_ios&& __rhs) {move(__rhs);} #endif - _LIBCPP_INLINE_VISIBILITY + _LIBCPP_INLINE_VISIBILITY void swap(basic_ios& __rhs) _NOEXCEPT; - _LIBCPP_INLINE_VISIBILITY + _LIBCPP_INLINE_VISIBILITY void set_rdbuf(basic_streambuf* __sb); private: basic_ostream* __tie_; diff --git a/libcxx/include/iterator b/libcxx/include/iterator index 03cfd8305994..e73b4b713ed0 100644 --- a/libcxx/include/iterator +++ b/libcxx/include/iterator @@ -69,7 +69,7 @@ typename iterator_traits::difference_type n = 1); template // constexpr in C++17 constexpr BidirectionalIterator prev(BidirectionalIterator x, - typename iterator_traits::difference_type n = 1); + typename iterator_traits::difference_type n = 1); template class reverse_iterator @@ -136,7 +136,7 @@ operator-(const reverse_iterator& x, const reverse_iterator constexpr reverse_iterator -operator+(typename reverse_iterator::difference_type n, +operator+(typename reverse_iterator::difference_type n, const reverse_iterator& x); // constexpr in C++17 template @@ -216,7 +216,7 @@ public: typedef typename iterator_traits::value_type value_type; typedef typename iterator_traits::iterator_category iterator_category; typedef value_type&& reference; - + constexpr move_iterator(); // all the constexprs are in C++17 constexpr explicit move_iterator(Iterator i); template @@ -230,10 +230,10 @@ public: constexpr move_iterator operator++(int); constexpr move_iterator& operator--(); constexpr move_iterator operator--(int); - constexpr move_iterator operator+(difference_type n) const; - constexpr move_iterator& operator+=(difference_type n); - constexpr move_iterator operator-(difference_type n) const; - constexpr move_iterator& operator-=(difference_type n); + constexpr move_iterator operator+(difference_type n) const; + constexpr move_iterator& operator+=(difference_type n); + constexpr move_iterator operator-(difference_type n) const; + constexpr move_iterator& operator-=(difference_type n); constexpr unspecified operator[](difference_type n) const; private: Iterator current; // exposition only @@ -270,7 +270,7 @@ operator-(const move_iterator& x, template constexpr move_iterator operator+( // constexpr in C++17 - typename move_iterator::difference_type n, + typename move_iterator::difference_type n, const move_iterator& x); template // constexpr in C++17 @@ -534,8 +534,8 @@ struct __is_random_access_iterator : public __has_iterator_category_convertible_ template struct __is_exactly_input_iterator - : public integral_constant::value && + : public integral_constant::value && !__has_iterator_category_convertible_to<_Tp, forward_iterator_tag>::value> {}; template inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 typename enable_if < - __is_input_iterator<_InputIter>::value, + __is_input_iterator<_InputIter>::value, _InputIter >::type next(_InputIter __x, @@ -637,7 +637,7 @@ template inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 typename enable_if < - __is_input_iterator<_InputIter>::value, + __is_input_iterator<_InputIter>::value, _InputIter >::type prev(_InputIter __x, @@ -1129,7 +1129,7 @@ public: _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 move_iterator(const move_iterator<_Up>& __u) : __i(__u.base()) {} _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 _Iter base() const {return __i;} - _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 + _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 reference operator*() const { return static_cast(*__i); } _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 pointer operator->() const { return __i;} @@ -1649,7 +1649,7 @@ operator+(typename __wrap_iter<_Iter>::difference_type __n, template struct __libcpp_is_trivial_iterator : public _LIBCPP_BOOL_CONSTANT(is_pointer<_Iter>::value) {}; - + template struct __libcpp_is_trivial_iterator > : public _LIBCPP_BOOL_CONSTANT(__libcpp_is_trivial_iterator<_Iter>::value) {}; @@ -1904,7 +1904,7 @@ template constexpr _LIBCPP_INLINE_VISIBILITY auto data(const _Cont& __c) _NOEXCEPT_(noexcept(__c.data())) --> decltype (__c.data()) +-> decltype (__c.data()) { return __c.data(); } template diff --git a/libcxx/include/locale b/libcxx/include/locale index d570331bbb03..3fe44300227a 100644 --- a/libcxx/include/locale +++ b/libcxx/include/locale @@ -126,7 +126,7 @@ public: 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); @@ -3923,7 +3923,7 @@ private: wbuffer_convert(const wbuffer_convert&); wbuffer_convert& operator=(const wbuffer_convert&); public: - _LIBCPP_EXPLICIT_AFTER_CXX11 wbuffer_convert(streambuf* __bytebuf = 0, + _LIBCPP_EXPLICIT_AFTER_CXX11 wbuffer_convert(streambuf* __bytebuf = 0, _Codecvt* __pcvt = new _Codecvt, state_type __state = state_type()); ~wbuffer_convert(); @@ -4038,7 +4038,7 @@ wbuffer_convert<_Codecvt, _Elem, _Tr>::underflow() 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(); } diff --git a/libcxx/include/numeric b/libcxx/include/numeric index 62cc29cbd6a7..ba2fe2696a95 100644 --- a/libcxx/include/numeric +++ b/libcxx/include/numeric @@ -548,9 +548,9 @@ _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK template _LIBCPP_INLINE_VISIBILITY constexpr -enable_if_t - && is_object_v> - && ! is_void_v> +enable_if_t + && is_object_v> + && ! is_void_v> && (sizeof(remove_pointer_t<_TPtr>) > 0), _TPtr> midpoint(_TPtr __a, _TPtr __b) noexcept { @@ -568,7 +568,7 @@ _LIBCPP_INLINE_VISIBILITY constexpr enable_if_t, _Fp> midpoint(_Fp __a, _Fp __b) noexcept { - return isnormal(__a) && isnormal(__b) + return isnormal(__a) && isnormal(__b) && ((__sign(__a) != __sign(__b)) || ((numeric_limits<_Fp>::max() - abs(__a)) < abs(__b))) ? __a / 2 + __b / 2 : (__a + __b) / 2; diff --git a/libcxx/include/queue b/libcxx/include/queue index 55be80017855..97ec6f633c51 100644 --- a/libcxx/include/queue +++ b/libcxx/include/queue @@ -70,8 +70,8 @@ public: template queue(Container) -> queue; // C++17 - -template + +template queue(Container, Allocator) -> queue; // C++17 template @@ -165,13 +165,13 @@ public: 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 @@ -346,7 +346,7 @@ template queue(_Container) -> queue; - + template::value, nullptr_t>::type, @@ -558,8 +558,8 @@ template 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 +568,8 @@ template priority_queue(_InputIterator, _InputIterator, _Compare = _Compare(), _Container = _Container()) -> priority_queue::value_type, _Container, _Compare>; - -template::value, nullptr_t>::type, diff --git a/libcxx/include/random b/libcxx/include/random index a73239519ac1..9fefee081702 100644 --- a/libcxx/include/random +++ b/libcxx/include/random @@ -2226,19 +2226,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 intervals() const {return __b_;} _LIBCPP_INLINE_VISIBILITY diff --git a/libcxx/include/regex b/libcxx/include/regex index a0e3ba61e71c..0db3c91ce8bb 100644 --- a/libcxx/include/regex +++ b/libcxx/include/regex @@ -677,7 +677,7 @@ public: 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 +3410,7 @@ basic_regex<_CharT, _Traits>::__parse_BACKREF(_ForwardIterator __first, if (__temp != __last) { if (*__first == '\\') - { + { int __val = __traits_.value(*__temp, 10); if (__val >= 1 && __val <= 9) { @@ -4107,7 +4107,7 @@ basic_regex<_CharT, _Traits>::__parse_DUP_COUNT(_ForwardIterator __first, if ( __val != -1 ) { __c = __val; - for (++__first; + for (++__first; __first != __last && ( __val = __traits_.value(*__first, 10)) != -1; ++__first) { @@ -4487,7 +4487,7 @@ basic_regex<_CharT, _Traits>::__parse_character_escape(_ForwardIterator __first, 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 +4496,7 @@ basic_regex<_CharT, _Traits>::__parse_character_escape(_ForwardIterator __first, __push_char(_CharT(*__t % 32)); __first = ++__t; } - else + else __throw_regex_error(); } else @@ -5918,7 +5918,7 @@ basic_regex<_CharT, _Traits>::__search( { __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; @@ -6064,7 +6064,7 @@ bool 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 @@ -6128,7 +6128,7 @@ bool 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 @@ -6181,7 +6181,7 @@ public: #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 @@ -6377,7 +6377,7 @@ private: __result_ = &__position_->prefix(); else __result_ = &(*__position_)[__subs_[__n_]]; - } + } }; template diff --git a/libcxx/include/stack b/libcxx/include/stack index b50ca5cdcb14..2a2b350386e5 100644 --- a/libcxx/include/stack +++ b/libcxx/include/stack @@ -62,8 +62,8 @@ public: template stack(Container) -> stack; // C++17 - -template + +template stack(Container, Allocator) -> stack; // C++17 template @@ -118,7 +118,7 @@ public: 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; @@ -240,12 +240,12 @@ template stack(_Container) -> stack; - + template::value, nullptr_t>::type, class = typename enable_if< __is_allocator<_Alloc>::value, nullptr_t>::type - > + > stack(_Container, _Alloc) -> stack; #endif diff --git a/libcxx/include/string b/libcxx/include/string index 8d4e13cf5273..1e5b09800c61 100644 --- a/libcxx/include/string +++ b/libcxx/include/string @@ -627,13 +627,13 @@ struct __libcpp_string_gets_noexcept_iterator_impl : public false_type {}; #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 @@ -2525,7 +2525,7 @@ basic_string<_CharT, _Traits, _Allocator>::__append_forward_unsafe( 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 @@ basic_string<_CharT, _Traits, _Allocator>::__invariants() const template inline -void +void basic_string<_CharT, _Traits, _Allocator>::__clear_and_shrink() _NOEXCEPT { clear(); @@ -3834,7 +3834,7 @@ basic_string<_CharT, _Traits, _Allocator>::__clear_and_shrink() _NOEXCEPT __set_long_cap(0); __set_short_size(0); } -} +} // operator== @@ -4327,7 +4327,7 @@ basic_string<_CharT, _Traits, _Allocator>::__subscriptable(const const_iterator* _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 { diff --git a/libcxx/include/string_view b/libcxx/include/string_view index 9a6eb0c23737..d29bcc3e8c1a 100644 --- a/libcxx/include/string_view +++ b/libcxx/include/string_view @@ -364,7 +364,7 @@ public: } _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY - int compare( size_type __pos1, size_type __n1, + int compare( size_type __pos1, size_type __n1, basic_string_view __sv, size_type __pos2, size_type __n2) const { return substr(__pos1, __n1).compare(__sv.substr(__pos2, __n2)); @@ -628,7 +628,7 @@ bool operator==(basic_string_view<_CharT, _Traits> __lhs, template _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY -bool operator==(typename common_type >::type __lhs, +bool operator==(typename common_type >::type __lhs, basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT { if ( __lhs.size() != __rhs.size()) return false; @@ -658,7 +658,7 @@ bool operator!=(basic_string_view<_CharT, _Traits> __lhs, template _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY -bool operator!=(typename common_type >::type __lhs, +bool operator!=(typename common_type >::type __lhs, basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT { if ( __lhs.size() != __rhs.size()) @@ -685,7 +685,7 @@ bool operator<(basic_string_view<_CharT, _Traits> __lhs, template _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY -bool operator<(typename common_type >::type __lhs, +bool operator<(typename common_type >::type __lhs, basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT { return __lhs.compare(__rhs) < 0; @@ -710,7 +710,7 @@ bool operator>(basic_string_view<_CharT, _Traits> __lhs, template _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY -bool operator>(typename common_type >::type __lhs, +bool operator>(typename common_type >::type __lhs, basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT { return __lhs.compare(__rhs) > 0; @@ -735,7 +735,7 @@ bool operator<=(basic_string_view<_CharT, _Traits> __lhs, template _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY -bool operator<=(typename common_type >::type __lhs, +bool operator<=(typename common_type >::type __lhs, basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT { return __lhs.compare(__rhs) <= 0; @@ -761,7 +761,7 @@ bool operator>=(basic_string_view<_CharT, _Traits> __lhs, template _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY -bool operator>=(typename common_type >::type __lhs, +bool operator>=(typename common_type >::type __lhs, basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT { return __lhs.compare(__rhs) >= 0; @@ -787,7 +787,7 @@ struct _LIBCPP_TEMPLATE_VIS hash > }; -#if _LIBCPP_STD_VER > 11 +#if _LIBCPP_STD_VER > 11 inline namespace literals { inline namespace string_view_literals diff --git a/libcxx/include/unordered_map b/libcxx/include/unordered_map index 42057c5d3fd1..4dfe69868e54 100644 --- a/libcxx/include/unordered_map +++ b/libcxx/include/unordered_map @@ -79,12 +79,12 @@ public: unordered_map(InputIterator f, InputIterator l, size_type n, const allocator_type& a) : unordered_map(f, l, n, hasher(), key_equal(), a) {} // C++14 template - unordered_map(InputIterator f, InputIterator l, size_type n, const hasher& hf, + unordered_map(InputIterator f, InputIterator l, size_type n, const hasher& hf, const allocator_type& a) : unordered_map(f, l, n, hf, key_equal(), a) {} // C++14 unordered_map(initializer_list il, size_type n, const allocator_type& a) : unordered_map(il, n, hasher(), key_equal(), a) {} // C++14 - unordered_map(initializer_list il, size_type n, const hasher& hf, + unordered_map(initializer_list il, size_type n, const hasher& hf, const allocator_type& a) : unordered_map(il, n, hf, key_equal(), a) {} // C++14 ~unordered_map(); @@ -277,12 +277,12 @@ public: unordered_multimap(InputIterator f, InputIterator l, size_type n, const allocator_type& a) : unordered_multimap(f, l, n, hasher(), key_equal(), a) {} // C++14 template - unordered_multimap(InputIterator f, InputIterator l, size_type n, const hasher& hf, + unordered_multimap(InputIterator f, InputIterator l, size_type n, const hasher& hf, const allocator_type& a) : unordered_multimap(f, l, n, hf, key_equal(), a) {} // C++14 unordered_multimap(initializer_list il, size_type n, const allocator_type& a) : unordered_multimap(il, n, hasher(), key_equal(), a) {} // C++14 - unordered_multimap(initializer_list il, size_type n, const hasher& hf, + unordered_multimap(initializer_list il, size_type n, const hasher& hf, const allocator_type& a) : unordered_multimap(il, n, hf, key_equal(), a) {} // C++14 ~unordered_multimap(); @@ -951,14 +951,14 @@ public: : unordered_map(__first, __last, __n, hasher(), key_equal(), __a) {} template _LIBCPP_INLINE_VISIBILITY - unordered_map(_InputIterator __first, _InputIterator __last, size_type __n, const hasher& __hf, + unordered_map(_InputIterator __first, _InputIterator __last, size_type __n, const hasher& __hf, const allocator_type& __a) : unordered_map(__first, __last, __n, __hf, key_equal(), __a) {} _LIBCPP_INLINE_VISIBILITY unordered_map(initializer_list __il, size_type __n, const allocator_type& __a) : unordered_map(__il, __n, hasher(), key_equal(), __a) {} _LIBCPP_INLINE_VISIBILITY - unordered_map(initializer_list __il, size_type __n, const hasher& __hf, + unordered_map(initializer_list __il, size_type __n, const hasher& __hf, const allocator_type& __a) : unordered_map(__il, __n, __hf, key_equal(), __a) {} #endif @@ -1778,14 +1778,14 @@ public: : unordered_multimap(__first, __last, __n, hasher(), key_equal(), __a) {} template _LIBCPP_INLINE_VISIBILITY - unordered_multimap(_InputIterator __first, _InputIterator __last, size_type __n, const hasher& __hf, + unordered_multimap(_InputIterator __first, _InputIterator __last, size_type __n, const hasher& __hf, const allocator_type& __a) : unordered_multimap(__first, __last, __n, __hf, key_equal(), __a) {} _LIBCPP_INLINE_VISIBILITY unordered_multimap(initializer_list __il, size_type __n, const allocator_type& __a) : unordered_multimap(__il, __n, hasher(), key_equal(), __a) {} _LIBCPP_INLINE_VISIBILITY - unordered_multimap(initializer_list __il, size_type __n, const hasher& __hf, + unordered_multimap(initializer_list __il, size_type __n, const hasher& __hf, const allocator_type& __a) : unordered_multimap(__il, __n, __hf, key_equal(), __a) {} #endif diff --git a/libcxx/include/unordered_set b/libcxx/include/unordered_set index b32e4cae2cdc..3661e36a3712 100644 --- a/libcxx/include/unordered_set +++ b/libcxx/include/unordered_set @@ -75,7 +75,7 @@ public: template unordered_set(InputIterator f, InputIterator l, size_type n, const allocator_type& a); // C++14 template - unordered_set(InputIterator f, InputIterator l, size_type n, + unordered_set(InputIterator f, InputIterator l, size_type n, const hasher& hf, const allocator_type& a); // C++14 unordered_set(initializer_list il, size_type n, const allocator_type& a); // C++14 unordered_set(initializer_list il, size_type n, @@ -242,7 +242,7 @@ public: unordered_multiset(InputIterator f, InputIterator l, size_type n, const hasher& hf, const allocator_type& a); // C++14 unordered_multiset(initializer_list il, size_type n, const allocator_type& a); // C++14 - unordered_multiset(initializer_list il, size_type n, + unordered_multiset(initializer_list il, size_type n, const hasher& hf, const allocator_type& a); // C++14 ~unordered_multiset(); unordered_multiset& operator=(const unordered_multiset&); @@ -450,11 +450,11 @@ public: #if _LIBCPP_STD_VER > 11 template inline _LIBCPP_INLINE_VISIBILITY - unordered_set(_InputIterator __first, _InputIterator __last, + unordered_set(_InputIterator __first, _InputIterator __last, size_type __n, const allocator_type& __a) : unordered_set(__first, __last, __n, hasher(), key_equal(), __a) {} template - unordered_set(_InputIterator __first, _InputIterator __last, + unordered_set(_InputIterator __first, _InputIterator __last, size_type __n, const hasher& __hf, const allocator_type& __a) : unordered_set(__first, __last, __n, __hf, key_equal(), __a) {} #endif @@ -480,7 +480,7 @@ public: const allocator_type& __a) : unordered_set(__il, __n, hasher(), key_equal(), __a) {} inline _LIBCPP_INLINE_VISIBILITY - unordered_set(initializer_list __il, size_type __n, + unordered_set(initializer_list __il, size_type __n, const hasher& __hf, const allocator_type& __a) : unordered_set(__il, __n, __hf, key_equal(), __a) {} #endif @@ -1052,7 +1052,7 @@ public: #if _LIBCPP_STD_VER > 11 template inline _LIBCPP_INLINE_VISIBILITY - unordered_multiset(_InputIterator __first, _InputIterator __last, + unordered_multiset(_InputIterator __first, _InputIterator __last, size_type __n, const allocator_type& __a) : unordered_multiset(__first, __last, __n, hasher(), key_equal(), __a) {} template