diff options
-rw-r--r-- | libcxx/include/chrono | 16 | ||||
-rw-r--r-- | libcxx/include/complex | 4 | ||||
-rw-r--r-- | libcxx/include/forward_list | 6 | ||||
-rw-r--r-- | libcxx/include/future | 10 | ||||
-rw-r--r-- | libcxx/include/initializer_list | 2 | ||||
-rw-r--r-- | libcxx/include/iomanip | 10 | ||||
-rw-r--r-- | libcxx/include/ios | 30 | ||||
-rw-r--r-- | libcxx/include/iterator | 30 | ||||
-rw-r--r-- | libcxx/include/locale | 6 | ||||
-rw-r--r-- | libcxx/include/numeric | 8 | ||||
-rw-r--r-- | libcxx/include/queue | 20 | ||||
-rw-r--r-- | libcxx/include/random | 16 | ||||
-rw-r--r-- | libcxx/include/regex | 20 | ||||
-rw-r--r-- | libcxx/include/stack | 10 | ||||
-rw-r--r-- | libcxx/include/string | 16 | ||||
-rw-r--r-- | libcxx/include/string_view | 16 | ||||
-rw-r--r-- | libcxx/include/unordered_map | 16 | ||||
-rw-r--r-- | libcxx/include/unordered_set | 12 |
18 files changed, 124 insertions, 124 deletions
diff --git a/libcxx/include/chrono b/libcxx/include/chrono index 0ee8c32d734..1b907571aa1 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<unsigned>(__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<unsigned>(__d)); } - + constexpr chrono::year operator ""y(unsigned long long __y) noexcept { return chrono::year(static_cast<int>(__y)); diff --git a/libcxx/include/complex b/libcxx/include/complex index ff702b4ffc7..c168406befb 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<long double> operator""il(long double __im) diff --git a/libcxx/include/forward_list b/libcxx/include/forward_list index b7ac0ddf2ce..54021d0a03e 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<bool, __node_traits::propagate_on_container_swap::value>()); using _VSTD::swap; swap(__before_begin()->__next_, __x.__before_begin()->__next_); diff --git a/libcxx/include/future b/libcxx/include/future index 50bdd2da278..24396e72ac4 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 6c4493b7060..893736f57ea 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 82b7603a348..3f78f4d02b3 100644 --- a/libcxx/include/iomanip +++ b/libcxx/include/iomanip @@ -515,7 +515,7 @@ put_time(const tm* __tm, const _CharT* __fmt) template <class _CharT, class _Traits, class _ForwardIterator> 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 <class _CharT, class _Traits, class _Iter> 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 <class _CharT, class _Traits, class _Allocator> _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 <class _CharT, class _Traits, class _Allocator> _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 ce4e1769f2f..88efefb46ff 100644 --- a/libcxx/include/ios +++ b/libcxx/include/ios @@ -202,8 +202,8 @@ enum class io_errc }; concept_map ErrorCodeEnum<io_errc> { }; -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<char_type, traits_type>* tie() const; - _LIBCPP_INLINE_VISIBILITY + _LIBCPP_INLINE_VISIBILITY basic_ostream<char_type, traits_type>* tie(basic_ostream<char_type, traits_type>* __tiestr); - _LIBCPP_INLINE_VISIBILITY + _LIBCPP_INLINE_VISIBILITY basic_streambuf<char_type, traits_type>* rdbuf() const; - _LIBCPP_INLINE_VISIBILITY + _LIBCPP_INLINE_VISIBILITY basic_streambuf<char_type, traits_type>* rdbuf(basic_streambuf<char_type, traits_type>* __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<char_type, traits_type>* __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<char_type, traits_type>* __sb); private: basic_ostream<char_type, traits_type>* __tie_; diff --git a/libcxx/include/iterator b/libcxx/include/iterator index 03cfd830599..e73b4b713ed 100644 --- a/libcxx/include/iterator +++ b/libcxx/include/iterator @@ -69,7 +69,7 @@ typename iterator_traits<InputIterator>::difference_type n = 1); template <class BidirectionalIterator> // constexpr in C++17 constexpr BidirectionalIterator prev(BidirectionalIterator x, - typename iterator_traits<BidirectionalIterator>::difference_type n = 1); + typename iterator_traits<BidirectionalIterator>::difference_type n = 1); template <class Iterator> class reverse_iterator @@ -136,7 +136,7 @@ operator-(const reverse_iterator<Iterator1>& x, const reverse_iterator<Iterator2 template <class Iterator> constexpr reverse_iterator<Iterator> -operator+(typename reverse_iterator<Iterator>::difference_type n, +operator+(typename reverse_iterator<Iterator>::difference_type n, const reverse_iterator<Iterator>& x); // constexpr in C++17 template <class Iterator> @@ -216,7 +216,7 @@ public: typedef typename iterator_traits<Iterator>::value_type value_type; typedef typename iterator_traits<Iterator>::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 <class U> @@ -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<Iterator1>& x, template <class Iterator> constexpr move_iterator<Iterator> operator+( // constexpr in C++17 - typename move_iterator<Iterator>::difference_type n, + typename move_iterator<Iterator>::difference_type n, const move_iterator<Iterator>& x); template <class Iterator> // constexpr in C++17 @@ -534,8 +534,8 @@ struct __is_random_access_iterator : public __has_iterator_category_convertible_ template <class _Tp> struct __is_exactly_input_iterator - : public integral_constant<bool, - __has_iterator_category_convertible_to<_Tp, input_iterator_tag>::value && + : public integral_constant<bool, + __has_iterator_category_convertible_to<_Tp, input_iterator_tag>::value && !__has_iterator_category_convertible_to<_Tp, forward_iterator_tag>::value> {}; template<class _Category, class _Tp, class _Distance = ptrdiff_t, @@ -620,7 +620,7 @@ template <class _InputIter> 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 <class _InputIter> 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<reference>(*__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 <class _Iter> struct __libcpp_is_trivial_iterator : public _LIBCPP_BOOL_CONSTANT(is_pointer<_Iter>::value) {}; - + template <class _Iter> struct __libcpp_is_trivial_iterator<move_iterator<_Iter> > : public _LIBCPP_BOOL_CONSTANT(__libcpp_is_trivial_iterator<_Iter>::value) {}; @@ -1904,7 +1904,7 @@ template <class _Cont> constexpr _LIBCPP_INLINE_VISIBILITY auto data(const _Cont& __c) _NOEXCEPT_(noexcept(__c.data())) --> decltype (__c.data()) +-> decltype (__c.data()) { return __c.data(); } template <class _Tp, size_t _Sz> diff --git a/libcxx/include/locale b/libcxx/include/locale index d570331bbb0..3fe44300227 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<char *>(__extbufend_)); __c = *this->gptr(); } diff --git a/libcxx/include/numeric b/libcxx/include/numeric index 62cc29cbd6a..ba2fe2696a9 100644 --- a/libcxx/include/numeric +++ b/libcxx/include/numeric @@ -548,9 +548,9 @@ _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK template <class _TPtr> _LIBCPP_INLINE_VISIBILITY constexpr -enable_if_t<is_pointer_v<_TPtr> - && is_object_v<remove_pointer_t<_TPtr>> - && ! is_void_v<remove_pointer_t<_TPtr>> +enable_if_t<is_pointer_v<_TPtr> + && is_object_v<remove_pointer_t<_TPtr>> + && ! is_void_v<remove_pointer_t<_TPtr>> && (sizeof(remove_pointer_t<_TPtr>) > 0), _TPtr> midpoint(_TPtr __a, _TPtr __b) noexcept { @@ -568,7 +568,7 @@ _LIBCPP_INLINE_VISIBILITY constexpr enable_if_t<is_floating_point_v<_Fp>, _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 55be8001785..97ec6f633c5 100644 --- a/libcxx/include/queue +++ b/libcxx/include/queue @@ -70,8 +70,8 @@ public: template<class Container> queue(Container) -> queue<typename Container::value_type, Container>; // C++17 - -template<class Container, class Allocator> + +template<class Container, class Allocator> queue(Container, Allocator) -> queue<typename Container::value_type, Container>; // C++17 template <class T, class Container> @@ -165,13 +165,13 @@ public: template <class Compare, class Container> priority_queue(Compare, Container) -> priority_queue<typename Container::value_type, Container, Compare>; // C++17 - -template<class InputIterator, + +template<class InputIterator, class Compare = less<typename iterator_traits<InputIterator>::value_type>, class Container = vector<typename iterator_traits<InputIterator>::value_type>> priority_queue(InputIterator, InputIterator, Compare = Compare(), Container = Container()) -> priority_queue<typename iterator_traits<InputIterator>::value_type, Container, Compare>; // C++17 - + template<class Compare, class Container, class Allocator> priority_queue(Compare, Container, Allocator) -> priority_queue<typename Container::value_type, Container, Compare>; // C++17 @@ -346,7 +346,7 @@ template<class _Container, > queue(_Container) -> queue<typename _Container::value_type, _Container>; - + template<class _Container, class _Alloc, class = typename enable_if<!__is_allocator<_Container>::value, nullptr_t>::type, @@ -558,8 +558,8 @@ template <class _Compare, > priority_queue(_Compare, _Container) -> priority_queue<typename _Container::value_type, _Container, _Compare>; - -template<class _InputIterator, + +template<class _InputIterator, class _Compare = less<typename iterator_traits<_InputIterator>::value_type>, class _Container = vector<typename iterator_traits<_InputIterator>::value_type>, class = typename enable_if< __is_input_iterator<_InputIterator>::value, nullptr_t>::type, @@ -568,8 +568,8 @@ template<class _InputIterator, > priority_queue(_InputIterator, _InputIterator, _Compare = _Compare(), _Container = _Container()) -> priority_queue<typename iterator_traits<_InputIterator>::value_type, _Container, _Compare>; - -template<class _Compare, + +template<class _Compare, class _Container, class _Alloc, class = typename enable_if<!__is_allocator<_Compare>::value, nullptr_t>::type, diff --git a/libcxx/include/random b/libcxx/include/random index a73239519ac..9fefee08170 100644 --- a/libcxx/include/random +++ b/libcxx/include/random @@ -2226,19 +2226,19 @@ template <class _UIntType, size_t __w, size_t __n, size_t __m, size_t __r, template <class _UIntType, size_t __w, size_t __n, size_t __m, size_t __r, _UIntType __a, size_t __u, _UIntType __d, size_t __s, _UIntType __b, size_t __t, _UIntType __c, size_t __l, _UIntType __f> - _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 <class _UIntType, size_t __w, size_t __n, size_t __m, size_t __r, _UIntType __a, size_t __u, _UIntType __d, size_t __s, _UIntType __b, size_t __t, _UIntType __c, size_t __l, _UIntType __f> - _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 <class _UIntType, size_t __w, size_t __n, size_t __m, size_t __r, _UIntType __a, size_t __u, _UIntType __d, size_t __s, _UIntType __b, size_t __t, _UIntType __c, size_t __l, _UIntType __f> - _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 <class _UIntType, size_t __w, size_t __n, size_t __m, size_t __r, @@ -2250,7 +2250,7 @@ template <class _UIntType, size_t __w, size_t __n, size_t __m, size_t __r, template <class _UIntType, size_t __w, size_t __n, size_t __m, size_t __r, _UIntType __a, size_t __u, _UIntType __d, size_t __s, _UIntType __b, size_t __t, _UIntType __c, size_t __l, _UIntType __f> - _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 <class _UIntType, size_t __w, size_t __n, size_t __m, size_t __r, @@ -2262,7 +2262,7 @@ template <class _UIntType, size_t __w, size_t __n, size_t __m, size_t __r, template <class _UIntType, size_t __w, size_t __n, size_t __m, size_t __r, _UIntType __a, size_t __u, _UIntType __d, size_t __s, _UIntType __b, size_t __t, _UIntType __c, size_t __l, _UIntType __f> - _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 <class _UIntType, size_t __w, size_t __n, size_t __m, size_t __r, @@ -2274,7 +2274,7 @@ template <class _UIntType, size_t __w, size_t __n, size_t __m, size_t __r, template <class _UIntType, size_t __w, size_t __n, size_t __m, size_t __r, _UIntType __a, size_t __u, _UIntType __d, size_t __s, _UIntType __b, size_t __t, _UIntType __c, size_t __l, _UIntType __f> - _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 <class _UIntType, size_t __w, size_t __n, size_t __m, size_t __r, @@ -2286,7 +2286,7 @@ template <class _UIntType, size_t __w, size_t __n, size_t __m, size_t __r, template <class _UIntType, size_t __w, size_t __n, size_t __m, size_t __r, _UIntType __a, size_t __u, _UIntType __d, size_t __s, _UIntType __b, size_t __t, _UIntType __c, size_t __l, _UIntType __f> - _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 <class _UIntType, size_t __w, size_t __n, size_t __m, size_t __r, @@ -6426,7 +6426,7 @@ public: param_type(size_t __nw, result_type __xmin, result_type __xmax, _UnaryOperation __fw); param_type & operator=(const param_type& __rhs); - + _LIBCPP_INLINE_VISIBILITY vector<result_type> intervals() const {return __b_;} _LIBCPP_INLINE_VISIBILITY diff --git a/libcxx/include/regex b/libcxx/include/regex index a0e3ba61e71..0db3c91ce8b 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<regex_constants::error_escape>(); } 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<typename basic_string<_Cp, _ST, _SA>::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<typename basic_string<_CharT, _ST, _SA>::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 <class _CharT, class _Traits> @@ -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 <class _BidirectionalIterator, class _CharT, class _Traits> diff --git a/libcxx/include/stack b/libcxx/include/stack index b50ca5cdcb1..2a2b350386e 100644 --- a/libcxx/include/stack +++ b/libcxx/include/stack @@ -62,8 +62,8 @@ public: template<class Container> stack(Container) -> stack<typename Container::value_type, Container>; // C++17 - -template<class Container, class Allocator> + +template<class Container, class Allocator> stack(Container, Allocator) -> stack<typename Container::value_type, Container>; // C++17 template <class T, class Container> @@ -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<class _Container, > stack(_Container) -> stack<typename _Container::value_type, _Container>; - + template<class _Container, class _Alloc, class = typename enable_if<!__is_allocator<_Container>::value, nullptr_t>::type, class = typename enable_if< __is_allocator<_Alloc>::value, nullptr_t>::type - > + > stack(_Container, _Alloc) -> stack<typename _Container::value_type, _Container>; #endif diff --git a/libcxx/include/string b/libcxx/include/string index 8d4e13cf527..1e5b09800c6 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 <class _Iter, bool = __is_forward_iterator<_Iter>::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 <class _Iter> +template <class _Iter> 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<class _CharT, class _Traits, class _Allocator> 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<char>) _LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_string<wchar_t>) -#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 9a6eb0c2373..d29bcc3e8c1 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<class _CharT, class _Traits> _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY -bool operator==(typename common_type<basic_string_view<_CharT, _Traits> >::type __lhs, +bool operator==(typename common_type<basic_string_view<_CharT, _Traits> >::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<class _CharT, class _Traits> _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY -bool operator!=(typename common_type<basic_string_view<_CharT, _Traits> >::type __lhs, +bool operator!=(typename common_type<basic_string_view<_CharT, _Traits> >::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<class _CharT, class _Traits> _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY -bool operator<(typename common_type<basic_string_view<_CharT, _Traits> >::type __lhs, +bool operator<(typename common_type<basic_string_view<_CharT, _Traits> >::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<class _CharT, class _Traits> _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY -bool operator>(typename common_type<basic_string_view<_CharT, _Traits> >::type __lhs, +bool operator>(typename common_type<basic_string_view<_CharT, _Traits> >::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<class _CharT, class _Traits> _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY -bool operator<=(typename common_type<basic_string_view<_CharT, _Traits> >::type __lhs, +bool operator<=(typename common_type<basic_string_view<_CharT, _Traits> >::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<class _CharT, class _Traits> _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY -bool operator>=(typename common_type<basic_string_view<_CharT, _Traits> >::type __lhs, +bool operator>=(typename common_type<basic_string_view<_CharT, _Traits> >::type __lhs, basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT { return __lhs.compare(__rhs) >= 0; @@ -787,7 +787,7 @@ struct _LIBCPP_TEMPLATE_VIS hash<basic_string_view<_CharT, _Traits> > }; -#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 42057c5d3fd..4dfe69868e5 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 <class InputIterator> - 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<value_type> il, size_type n, const allocator_type& a) : unordered_map(il, n, hasher(), key_equal(), a) {} // C++14 - unordered_map(initializer_list<value_type> il, size_type n, const hasher& hf, + unordered_map(initializer_list<value_type> 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 <class InputIterator> - 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<value_type> il, size_type n, const allocator_type& a) : unordered_multimap(il, n, hasher(), key_equal(), a) {} // C++14 - unordered_multimap(initializer_list<value_type> il, size_type n, const hasher& hf, + unordered_multimap(initializer_list<value_type> 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 <class _InputIterator> _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<value_type> __il, size_type __n, const allocator_type& __a) : unordered_map(__il, __n, hasher(), key_equal(), __a) {} _LIBCPP_INLINE_VISIBILITY - unordered_map(initializer_list<value_type> __il, size_type __n, const hasher& __hf, + unordered_map(initializer_list<value_type> __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 <class _InputIterator> _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<value_type> __il, size_type __n, const allocator_type& __a) : unordered_multimap(__il, __n, hasher(), key_equal(), __a) {} _LIBCPP_INLINE_VISIBILITY - unordered_multimap(initializer_list<value_type> __il, size_type __n, const hasher& __hf, + unordered_multimap(initializer_list<value_type> __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 b32e4cae2cd..3661e36a371 100644 --- a/libcxx/include/unordered_set +++ b/libcxx/include/unordered_set @@ -75,7 +75,7 @@ public: template <class InputIterator> unordered_set(InputIterator f, InputIterator l, size_type n, const allocator_type& a); // C++14 template <class InputIterator> - 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<value_type> il, size_type n, const allocator_type& a); // C++14 unordered_set(initializer_list<value_type> 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<value_type> il, size_type n, const allocator_type& a); // C++14 - unordered_multiset(initializer_list<value_type> il, size_type n, + unordered_multiset(initializer_list<value_type> 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 <class _InputIterator> 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 <class _InputIterator> - 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<value_type> __il, size_type __n, + unordered_set(initializer_list<value_type> __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 <class _InputIterator> 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 <class _InputIterator> |