diff --git a/include/__bit_reference b/include/__bit_reference index 9956a3953..a2fc809af 100644 --- a/include/__bit_reference +++ b/include/__bit_reference @@ -50,7 +50,7 @@ public: *__seg_ &= ~__mask_; return *this; } - + _LIBCPP_INLINE_VISIBILITY __bit_reference& operator=(const __bit_reference& __x) {return operator=(static_cast(__x));} @@ -1074,14 +1074,14 @@ public: } return *this; } - + _LIBCPP_INLINE_VISIBILITY __bit_iterator operator++(int) { __bit_iterator __tmp = *this; ++(*this); return __tmp; } - + _LIBCPP_INLINE_VISIBILITY __bit_iterator& operator--() { if (__ctz_ != 0) @@ -1093,14 +1093,14 @@ public: } return *this; } - + _LIBCPP_INLINE_VISIBILITY __bit_iterator operator--(int) { __bit_iterator __tmp = *this; --(*this); return __tmp; } - + _LIBCPP_INLINE_VISIBILITY __bit_iterator& operator+=(difference_type __n) { if (__n >= 0) @@ -1112,19 +1112,19 @@ public: __ctz_ = static_cast((__n + __ctz_) % __bits_per_word); return *this; } - + _LIBCPP_INLINE_VISIBILITY __bit_iterator& operator-=(difference_type __n) { return *this += -__n; } - + _LIBCPP_INLINE_VISIBILITY __bit_iterator operator+(difference_type __n) const { __bit_iterator __t(*this); __t += __n; return __t; } - + _LIBCPP_INLINE_VISIBILITY __bit_iterator operator-(difference_type __n) const { __bit_iterator __t(*this); diff --git a/include/__config b/include/__config index 31369c8fe..2bba0e96c 100644 --- a/include/__config +++ b/include/__config @@ -26,26 +26,26 @@ #if __LITTLE_ENDIAN__ #define _LIBCPP_LITTLE_ENDIAN 1 #define _LIBCPP_BIG_ENDIAN 0 -#endif -#endif +#endif // __LITTLE_ENDIAN__ +#endif // __LITTLE_ENDIAN__ #ifdef __BIG_ENDIAN__ #if __BIG_ENDIAN__ #define _LIBCPP_LITTLE_ENDIAN 0 #define _LIBCPP_BIG_ENDIAN 1 -#endif -#endif +#endif // __BIG_ENDIAN__ +#endif // __BIG_ENDIAN__ #ifdef __FreeBSD__ # include # if _BYTE_ORDER == _LITTLE_ENDIAN # define _LIBCPP_LITTLE_ENDIAN 1 # define _LIBCPP_BIG_ENDIAN 0 -# else +# else // _BYTE_ORDER == _LITTLE_ENDIAN # define _LIBCPP_LITTLE_ENDIAN 0 # define _LIBCPP_BIG_ENDIAN 1 -# endif -#endif +# endif // _BYTE_ORDER == _LITTLE_ENDIAN +#endif // __FreeBSD__ #if !defined(_LIBCPP_LITTLE_ENDIAN) || !defined(_LIBCPP_BIG_ENDIAN) # include @@ -55,10 +55,10 @@ # elif __BYTE_ORDER == __BIG_ENDIAN # define _LIBCPP_LITTLE_ENDIAN 0 # define _LIBCPP_BIG_ENDIAN 1 -# else +# else // __BYTE_ORDER == __BIG_ENDIAN # error unable to determine endian # endif -#endif +#endif // !defined(_LIBCPP_LITTLE_ENDIAN) || !defined(_LIBCPP_BIG_ENDIAN) #ifndef _LIBCPP_VISIBILITY_TAG #define _LIBCPP_VISIBILITY_TAG 1 @@ -67,10 +67,10 @@ #if _LIBCPP_VISIBILITY_TAG #define _LIBCPP_HIDDEN __attribute__ ((__visibility__("hidden"))) #define _LIBCPP_VISIBLE __attribute__ ((__visibility__("default"))) -#else +#else // _LIBCPP_VISIBILITY_TAG #define _LIBCPP_HIDDEN #define _LIBCPP_VISIBLE -#endif +#endif // _LIBCPP_VISIBILITY_TAG #ifndef _LIBCPP_INLINE_VISIBILITY #define _LIBCPP_INLINE_VISIBILITY __attribute__ ((__visibility__("hidden"), __always_inline__)) @@ -108,7 +108,7 @@ #define _LIBCPP_HAS_NO_UNICODE_CHARS #define _LIBCPP_HAS_NO_VARIADICS -#else +#else // __GXX_EXPERIMENTAL_CXX0X__ #if __has_feature(cxx_rvalue_references) #define _LIBCPP_MOVE @@ -121,7 +121,7 @@ #if !(__has_feature(cxx_deleted_functions)) #define _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS #define _LIBCPP_HAS_NO_DELETED_FUNCTIONS -#endif +#endif // !(__has_feature(cxx_deleted_functions)) #if !(__has_feature(cxx_nullptr)) #define _LIBCPP_HAS_NO_NULLPTR @@ -135,7 +135,7 @@ #define _LIBCPP_HAS_NO_VARIADICS #endif -#endif +#endif // __GXX_EXPERIMENTAL_CXX0X__ #elif defined(__GNUC__) @@ -156,7 +156,7 @@ #define _LIBCPP_HAS_NO_UNICODE_CHARS #define _LIBCPP_HAS_NO_VARIADICS -#else +#else // __GXX_EXPERIMENTAL_CXX0X__ #if __GNUC__ >= 4 && __GNUC_MINOR__ >= 3 #define _LIBCPP_MOVE @@ -173,21 +173,21 @@ #define _LIBCPP_HAS_NO_DELETED_FUNCTIONS #define _LIBCPP_HAS_NO_UNICODE_CHARS #define _LIBCPP_HAS_NO_VARIADICS -#endif +#endif // !(__GNUC__ >= 4 && __GNUC_MINOR__ >= 4) #if !(__GNUC__ >= 4 && __GNUC_MINOR__ >= 6) #define _LIBCPP_HAS_NO_NULLPTR #endif -#endif +#endif // __GXX_EXPERIMENTAL_CXX0X__ -#endif +#endif // defined(__GNUC__) #ifdef _LIBCPP_HAS_NO_STRONG_USING #define _LIBCPP_BEGIN_NAMESPACE_STD namespace std { #define _LIBCPP_END_NAMESPACE_STD } #define _STD std -#else +#else // _LIBCPP_HAS_NO_STRONG_USING #define _LIBCPP_BEGIN_NAMESPACE_STD namespace std { namespace _LIBCPP_NAMESPACE { #define _LIBCPP_END_NAMESPACE_STD } } #define _STD std::_LIBCPP_NAMESPACE @@ -198,12 +198,12 @@ namespace _LIBCPP_NAMESPACE { using namespace _LIBCPP_NAMESPACE __attribute__((__strong__)); } -#endif +#endif // _LIBCPP_HAS_NO_STRONG_USING #ifdef _LIBCPP_HAS_NO_UNICODE_CHARS typedef unsigned short char16_t; typedef unsigned int char32_t; -#endif +#endif // _LIBCPP_HAS_NO_UNICODE_CHARS #ifdef _LIBCPP_HAS_NO_STATIC_ASSERT @@ -214,7 +214,7 @@ template struct __static_assert_check {}; typedef __static_assert_check)> \ _LIBCPP_CONCAT(__t, __LINE__) -#endif +#endif // _LIBCPP_HAS_NO_STATIC_ASSERT #ifdef _LIBCPP_HAS_NO_DECLTYPE #define decltype(x) __typeof__(x) diff --git a/include/__functional_03 b/include/__functional_03 index f2880adcf..b90676299 100644 --- a/include/__functional_03 +++ b/include/__functional_03 @@ -246,7 +246,7 @@ public: #ifndef _LIBCPP_NO_RTTI virtual const void* target(const type_info&) const = 0; virtual const std::type_info& target_type() const = 0; -#endif +#endif // _LIBCPP_NO_RTTI }; template @@ -265,7 +265,7 @@ public: #ifndef _LIBCPP_NO_RTTI virtual const void* target(const type_info&) const = 0; virtual const std::type_info& target_type() const = 0; -#endif +#endif // _LIBCPP_NO_RTTI }; template @@ -284,7 +284,7 @@ public: #ifndef _LIBCPP_NO_RTTI virtual const void* target(const type_info&) const = 0; virtual const std::type_info& target_type() const = 0; -#endif +#endif // _LIBCPP_NO_RTTI }; template @@ -303,7 +303,7 @@ public: #ifndef _LIBCPP_NO_RTTI virtual const void* target(const type_info&) const = 0; virtual const std::type_info& target_type() const = 0; -#endif +#endif // _LIBCPP_NO_RTTI }; template class __func; @@ -324,7 +324,7 @@ public: #ifndef _LIBCPP_NO_RTTI virtual const void* target(const type_info&) const; virtual const std::type_info& target_type() const; -#endif +#endif // _LIBCPP_NO_RTTI }; template @@ -388,7 +388,7 @@ __func<_F, _Alloc, _R()>::target_type() const return typeid(_F); } -#endif +#endif // _LIBCPP_NO_RTTI template class __func<_F, _Alloc, _R(_A0)> @@ -406,7 +406,7 @@ public: #ifndef _LIBCPP_NO_RTTI virtual const void* target(const type_info&) const; virtual const std::type_info& target_type() const; -#endif +#endif // _LIBCPP_NO_RTTI }; template @@ -470,7 +470,7 @@ __func<_F, _Alloc, _R(_A0)>::target_type() const return typeid(_F); } -#endif +#endif // _LIBCPP_NO_RTTI template class __func<_F, _Alloc, _R(_A0, _A1)> @@ -488,7 +488,7 @@ public: #ifndef _LIBCPP_NO_RTTI virtual const void* target(const type_info&) const; virtual const std::type_info& target_type() const; -#endif +#endif // _LIBCPP_NO_RTTI }; template @@ -552,7 +552,7 @@ __func<_F, _Alloc, _R(_A0, _A1)>::target_type() const return typeid(_F); } -#endif +#endif // _LIBCPP_NO_RTTI template class __func<_F, _Alloc, _R(_A0, _A1, _A2)> @@ -570,7 +570,7 @@ public: #ifndef _LIBCPP_NO_RTTI virtual const void* target(const type_info&) const; virtual const std::type_info& target_type() const; -#endif +#endif // _LIBCPP_NO_RTTI }; template @@ -634,7 +634,7 @@ __func<_F, _Alloc, _R(_A0, _A1, _A2)>::target_type() const return typeid(_F); } -#endif +#endif // _LIBCPP_NO_RTTI } // __function @@ -706,7 +706,7 @@ public: const std::type_info& target_type() const; template _T* target(); template const _T* target() const; -#endif +#endif // _LIBCPP_NO_RTTI }; template @@ -882,7 +882,7 @@ function<_R()>::operator()() const #ifndef _LIBCPP_NO_EXCEPTIONS if (__f_ == 0) throw bad_function_call(); -#endif +#endif // _LIBCPP_NO_EXCEPTIONS return (*__f_)(); } @@ -917,7 +917,7 @@ function<_R()>::target() const return (const _T*)__f_->target(typeid(_T)); } -#endif +#endif // _LIBCPP_NO_RTTI template class function<_R(_A0)> @@ -998,7 +998,7 @@ public: const std::type_info& target_type() const; template _T* target(); template const _T* target() const; -#endif +#endif // _LIBCPP_NO_RTTI }; template @@ -1174,7 +1174,7 @@ function<_R(_A0)>::operator()(_A0 __a0) const #ifndef _LIBCPP_NO_EXCEPTIONS if (__f_ == 0) throw bad_function_call(); -#endif +#endif // _LIBCPP_NO_EXCEPTIONS return (*__f_)(__a0); } @@ -1209,7 +1209,7 @@ function<_R(_A0)>::target() const return (const _T*)__f_->target(typeid(_T)); } -#endif +#endif // _LIBCPP_NO_RTTI template class function<_R(_A0, _A1)> @@ -1290,7 +1290,7 @@ public: const std::type_info& target_type() const; template _T* target(); template const _T* target() const; -#endif +#endif // _LIBCPP_NO_RTTI }; template @@ -1466,7 +1466,7 @@ function<_R(_A0, _A1)>::operator()(_A0 __a0, _A1 __a1) const #ifndef _LIBCPP_NO_EXCEPTIONS if (__f_ == 0) throw bad_function_call(); -#endif +#endif // _LIBCPP_NO_EXCEPTIONS return (*__f_)(__a0, __a1); } @@ -1501,7 +1501,7 @@ function<_R(_A0, _A1)>::target() const return (const _T*)__f_->target(typeid(_T)); } -#endif +#endif // _LIBCPP_NO_RTTI template class function<_R(_A0, _A1, _A2)> @@ -1581,7 +1581,7 @@ public: const std::type_info& target_type() const; template _T* target(); template const _T* target() const; -#endif +#endif // _LIBCPP_NO_RTTI }; template @@ -1758,7 +1758,7 @@ function<_R(_A0, _A1, _A2)>::operator()(_A0 __a0, _A1 __a1, _A2 __a2) const #ifndef _LIBCPP_NO_EXCEPTIONS if (__f_ == 0) throw bad_function_call(); -#endif +#endif // _LIBCPP_NO_EXCEPTIONS return (*__f_)(__a0, __a1, __a2); } @@ -1793,29 +1793,29 @@ function<_R(_A0, _A1, _A2)>::target() const return (const _T*)__f_->target(typeid(_T)); } -#endif +#endif // _LIBCPP_NO_RTTI -template +template inline _LIBCPP_INLINE_VISIBILITY bool operator==(const function<_F>& __f, nullptr_t) {return !__f;} -template +template inline _LIBCPP_INLINE_VISIBILITY bool operator==(nullptr_t, const function<_F>& __f) {return !__f;} -template +template inline _LIBCPP_INLINE_VISIBILITY bool operator!=(const function<_F>& __f, nullptr_t) {return (bool)__f;} -template +template inline _LIBCPP_INLINE_VISIBILITY bool operator!=(nullptr_t, const function<_F>& __f) {return (bool)__f;} -template +template inline _LIBCPP_INLINE_VISIBILITY void swap(function<_F>& __x, function<_F>& __y) @@ -1868,7 +1868,6 @@ struct __mu_return1 typedef typename result_of<_Ti(_Uj...)>::type type; }; - template inline _LIBCPP_INLINE_VISIBILITY typename __mu_return1::type @@ -2006,7 +2005,7 @@ __apply_functor(_F& __f, _BoundArgs& __bound_args, __tuple_indices<_Indx...>, return __invoke(__f, __mu(get<_Indx>(__bound_args), __args)...); } -template +template class __bind { _F __f_; @@ -2024,7 +2023,7 @@ public: operator()(_Args&& ...__args) { // compiler bug workaround - return __apply_functor(__f_, __bound_args_, __indices(), + return __apply_functor(__f_, __bound_args_, __indices(), tuple<_Args&&...>(__args...)); } @@ -2032,15 +2031,15 @@ public: typename __bind_return<_F, tuple<_BoundArgs...>, tuple<_Args&&...> >::type operator()(_Args&& ...__args) const { - return __apply_functor(__f_, __bound_args_, __indices(), + return __apply_functor(__f_, __bound_args_, __indices(), tuple<_Args&&...>(__args...)); } }; -template +template struct __is_bind_expression<__bind<_F, _BoundArgs...> > : public true_type {}; -template +template class __bind_r : public __bind<_F, _BoundArgs...> { @@ -2068,10 +2067,10 @@ public: } }; -template +template struct __is_bind_expression<__bind_r<_R, _F, _BoundArgs...> > : public true_type {}; -template +template inline _LIBCPP_INLINE_VISIBILITY __bind::type, typename decay<_BoundArgs>::type...> bind(_F&& __f, _BoundArgs&&... __bound_args) @@ -2080,7 +2079,7 @@ bind(_F&& __f, _BoundArgs&&... __bound_args) return type(_STD::forward<_F>(__f), _STD::forward<_BoundArgs>(__bound_args)...); } -template +template inline _LIBCPP_INLINE_VISIBILITY __bind_r<_R, typename decay<_F>::type, typename decay<_BoundArgs>::type...> bind(_F&& __f, _BoundArgs&&... __bound_args) @@ -2090,4 +2089,4 @@ bind(_F&& __f, _BoundArgs&&... __bound_args) } */ -#endif +#endif // _LIBCPP_FUNCTIONAL_03 diff --git a/include/__functional_base b/include/__functional_base index fa8cfef00..2746867c8 100644 --- a/include/__functional_base +++ b/include/__functional_base @@ -514,7 +514,7 @@ cref(reference_wrapper<_Tp> __t) #ifdef _LIBCPP_MOVE template void ref(const _Tp&& __t);// = delete; // LWG 688 template void cref(const _Tp&& __t);// = delete; // LWG 688 -#endif +#endif // _LIBCPP_MOVE #endif // _LIBCPP_HAS_NO_VARIADICS diff --git a/include/__functional_base_03 b/include/__functional_base_03 index 049315156..19e7414f8 100644 --- a/include/__functional_base_03 +++ b/include/__functional_base_03 @@ -235,84 +235,84 @@ struct __weak_result_type<_R (_C::*)(_A1, _A2) volatile> // __invoke // __ref_return0 -// +// // template // struct ________ref_return0 // _HasResultType is true // { // typedef typename _Tp::result_type type; // }; -// +// // template // struct ________ref_return0<_Tp, false> // { // typedef void type; // }; -// +// // template // struct ____ref_return0 // _IsClass is true // : public ________ref_return0<_Tp, __has_result_type::type>::value> // { // }; -// +// // template // struct ______ref_return0 // _HasResultType is true // { // typedef typename __callable_type<_Tp>::result_type type; // }; -// +// // template // struct ______ref_return0<_Tp, false> // pointer to member data // { // typedef void type; // }; -// +// // template // struct ____ref_return0<_Tp, false> // : public ______ref_return0::type, // __has_result_type<__callable_type::type> >::value> // { // }; -// +// // template // struct __ref_return0 // : public ____ref_return0::type, // is_class::type>::value> // { // }; -// +// // __ref_return1 -// +// // template // struct ____ref_return1 // _IsClass is true // { // typedef typename result_of<_Tp(_A0)>::type type; // }; -// +// // template // struct ______ref_return1 // _HasResultType is true // { // typedef typename __callable_type<_Tp>::result_type type; // }; -// +// // template // struct __ref_return1_member_data1; -// +// // template // struct __ref_return1_member_data1<_R _C::*, _A0, true> // { // typedef typename __apply_cv<_A0, _R>::type& type; // }; -// +// // template // struct __ref_return1_member_data1<_R _C::*, _A0, false> // { // static _A0 __a; // typedef typename __apply_cv::type& type; // }; -// +// // template // struct __ref_return1_member_data; -// +// // template // struct __ref_return1_member_data<_R _C::*, _A0> // : public __ref_return1_member_data1<_R _C::*, _A0, @@ -320,90 +320,90 @@ struct __weak_result_type<_R (_C::*)(_A1, _A2) volatile> // typename remove_cv::type>::type>::value> // { // }; -// +// // template // struct ______ref_return1<_Tp, false, _A0> // pointer to member data // : public __ref_return1_member_data::type, _A0> // { // }; -// +// // template // struct ____ref_return1<_Tp, false, _A0> // : public ______ref_return1::type, // __has_result_type<__callable_type::type> >::value, _A0> // { // }; -// +// // template // struct __ref_return1 // : public ____ref_return1::type, // is_class::type>::value, _A0> // { // }; -// +// // __ref_return2 -// +// // template // struct ____ref_return2 // _IsClass is true // { // typedef typename result_of<_Tp(_A0, _A1)>::type type; // }; -// +// // template // struct ______ref_return2 // _HasResultType is true // { // typedef typename __callable_type<_Tp>::result_type type; // }; -// +// // template // struct ______ref_return2<_Tp, false, class _A0, class _A1> // pointer to member data // { // static_assert(sizeof(_Tp) == 0, "An attempt has been made to `call` a pointer" // " to member data with too many arguments."); // }; -// +// // template // struct ____ref_return2<_Tp, false, _A0, _A1> // : public ______ref_return2::type, // __has_result_type<__callable_type::type> >::value, _A0, _A1> // { // }; -// +// // template // struct __ref_return2 // : public ____ref_return2::type, // is_class::type>::value, _A0, _A1> // { // }; -// +// // __ref_return3 -// +// // template // struct ____ref_return3 // _IsClass is true // { // typedef typename result_of<_Tp(_A0, _A1, _A2)>::type type; // }; -// +// // template // struct ______ref_return3 // _HasResultType is true // { // typedef typename __callable_type<_Tp>::result_type type; // }; -// +// // template // struct ______ref_return3<_Tp, false, class _A0, class _A1, class _A2> // pointer to member data // { // static_assert(sizeof(_Tp) == 0, "An attempt has been made to `call` a pointer" // " to member data with too many arguments."); // }; -// +// // template // struct ____ref_return3<_Tp, false, _A0, _A1, _A2> // : public ______ref_return3::type, // __has_result_type<__callable_type::type> >::value, _A0, _A1, _A2> // { // }; -// +// // template // struct __ref_return3 // : public ____ref_return3::type, @@ -411,7 +411,6 @@ struct __weak_result_type<_R (_C::*)(_A1, _A2) volatile> // { // }; - // first bullet template @@ -911,7 +910,7 @@ __invoke(_F __f, _A0& __a0, _A1& __a1, _A2& __a2) // { // return __f(); // } -// +// // template // inline _LIBCPP_INLINE_VISIBILITY // typename enable_if @@ -923,7 +922,7 @@ __invoke(_F __f, _A0& __a0, _A1& __a1, _A2& __a2) // { // return __f(__a0); // } -// +// // template // inline _LIBCPP_INLINE_VISIBILITY // _R @@ -931,7 +930,7 @@ __invoke(_F __f, _A0& __a0, _A1& __a1, _A2& __a2) // { // return __f(__a0, __a1); // } -// +// // template // inline _LIBCPP_INLINE_VISIBILITY // _R @@ -1081,4 +1080,4 @@ cref(reference_wrapper<_Tp> __t) return cref(__t.get()); } -#endif +#endif // _LIBCPP_FUNCTIONAL_BASE_03 diff --git a/include/__hash_table b/include/__hash_table index 42fe36559..877310052 100644 --- a/include/__hash_table +++ b/include/__hash_table @@ -354,7 +354,7 @@ public: __x.size() = 0; } -#endif +#endif // _LIBCPP_MOVE size_type& size() {return __data_.first();} size_type size() const {return __data_.first();} @@ -489,7 +489,7 @@ public: #ifdef _LIBCPP_MOVE __hash_table(__hash_table&& __u); __hash_table(__hash_table&& __u, const allocator_type& __a); -#endif +#endif // _LIBCPP_MOVE ~__hash_table(); __hash_table& operator=(const __hash_table& __u); @@ -519,24 +519,24 @@ public: iterator __emplace_multi(_Args&&... __args); template iterator __emplace_hint_multi(const_iterator __p, _Args&&... __args); -#endif +#endif // _LIBCPP_MOVE pair __insert_unique(const value_type& __x); #ifdef _LIBCPP_MOVE template pair __insert_unique(_P&& __x); -#endif +#endif // _LIBCPP_MOVE #ifdef _LIBCPP_MOVE template iterator __insert_multi(_P&& __x); template iterator __insert_multi(const_iterator __p, _P&& __x); -#else +#else // _LIBCPP_MOVE iterator __insert_multi(const value_type& __x); iterator __insert_multi(const_iterator __p, const value_type& __x); -#endif +#endif // _LIBCPP_MOVE void clear(); void rehash(size_type __n); @@ -619,7 +619,7 @@ private: template __node_holder __construct_node(_Args&& ...__args); __node_holder __construct_node(value_type&& __v, size_t __hash); -#else +#else // _LIBCPP_MOVE __node_holder __construct_node(const value_type& __v); #endif __node_holder __construct_node(const value_type& __v, size_t __hash); @@ -777,7 +777,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__hash_table(__hash_table&& __u, } } -#endif +#endif // _LIBCPP_MOVE template __hash_table<_Tp, _Hash, _Equal, _Alloc>::~__hash_table() @@ -886,7 +886,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__move_assign( #ifndef _LIBCPP_NO_EXCEPTIONS try { -#endif +#endif // _LIBCPP_NO_EXCEPTIONS const_iterator __i = __u.begin(); while (__cache != nullptr && __u.size() != 0) { @@ -902,7 +902,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__move_assign( __deallocate(__cache); throw; } -#endif +#endif // _LIBCPP_NO_EXCEPTIONS __deallocate(__cache); } const_iterator __i = __u.begin(); @@ -926,7 +926,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::operator=(__hash_table&& __u) return *this; } -#endif +#endif // _LIBCPP_MOVE template template @@ -940,7 +940,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__assign_unique(_InputIterator __first #ifndef _LIBCPP_NO_EXCEPTIONS try { -#endif +#endif // _LIBCPP_NO_EXCEPTIONS for (; __cache != nullptr && __first != __last; ++__first) { __cache->__value_ = *__first; @@ -955,7 +955,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__assign_unique(_InputIterator __first __deallocate(__cache); throw; } -#endif +#endif // _LIBCPP_NO_EXCEPTIONS __deallocate(__cache); } for (; __first != __last; ++__first) @@ -974,7 +974,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__assign_multi(_InputIterator __first, #ifndef _LIBCPP_NO_EXCEPTIONS try { -#endif +#endif // _LIBCPP_NO_EXCEPTIONS for (; __cache != nullptr && __first != __last; ++__first) { __cache->__value_ = *__first; @@ -989,7 +989,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__assign_multi(_InputIterator __first, __deallocate(__cache); throw; } -#endif +#endif // _LIBCPP_NO_EXCEPTIONS __deallocate(__cache); } for (; __first != __last; ++__first) @@ -1130,7 +1130,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_insert_multi(__node_pointer __c for (bool __found = false; __pn->__next_ != nullptr && __pn->__next_->__hash_ % __bc == __chash; __pn = __pn->__next_) - { + { // __found key_eq() action // false false loop // true true loop @@ -1294,7 +1294,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__insert_unique(_P&& __x) return __r; } -#endif +#endif // _LIBCPP_MOVE #ifdef _LIBCPP_MOVE @@ -1321,7 +1321,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__insert_multi(const_iterator __p, return __r; } -#else +#else // _LIBCPP_MOVE template typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator @@ -1344,7 +1344,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__insert_multi(const_iterator __p, return __r; } -#endif +#endif // _LIBCPP_MOVE template void @@ -1409,7 +1409,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__rehash(size_type __nbc) __pp->__next_ = __np->__next_; __np->__next_ = __bucket_list_[__chash]->__next_; __bucket_list_[__chash]->__next_ = __cp; - + } } } @@ -1463,7 +1463,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::find(const _Key& __k) const return const_iterator(__nd); } } - + } return end(); } @@ -1498,7 +1498,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__construct_node(value_type&& __v, return _STD::move(__h); } -#else +#else // _LIBCPP_MOVE template typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_holder @@ -1513,7 +1513,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__construct_node(const value_type& __v return _STD::move(__h); } -#endif +#endif // _LIBCPP_MOVE template typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_holder diff --git a/include/__locale b/include/__locale index 743b39355..27f7b0dcb 100644 --- a/include/__locale +++ b/include/__locale @@ -108,7 +108,7 @@ class locale::id { once_flag __flag_; int32_t __id_; - + static int32_t __next_id; public: id() {} @@ -137,7 +137,7 @@ locale::combine(const locale& __other) const #ifndef _LIBCPP_NO_EXCEPTIONS if (!_STD::has_facet<_Facet>(__other)) throw runtime_error("locale::combine: locale missing facet"); -#endif +#endif // _LIBCPP_NO_EXCEPTIONS return locale(*this, &const_cast<_Facet&>(_STD::use_facet<_Facet>(__other))); } @@ -308,7 +308,7 @@ public: static const mask punct = _CTYPE_P; static const mask xdigit = _CTYPE_X; static const mask blank = _CTYPE_B; -#else /* !__APPLE__ */ +#else // __APPLE__ static const mask space = _ISspace; static const mask print = _ISprint; static const mask cntrl = _IScntrl; @@ -319,7 +319,7 @@ public: static const mask punct = _ISpunct; static const mask xdigit = _ISxdigit; static const mask blank = _ISblank; -#endif /* __APPLE__ */ +#endif // __APPLE__ static const mask alnum = alpha | digit; static const mask graph = alnum | punct; @@ -335,7 +335,7 @@ class ctype { public: typedef wchar_t char_type; - + _LIBCPP_ALWAYS_INLINE explicit ctype(size_t __refs = 0) : locale::facet(__refs) {} diff --git a/include/__mutex_base b/include/__mutex_base index 57088be63..bcfce1639 100644 --- a/include/__mutex_base +++ b/include/__mutex_base @@ -129,7 +129,7 @@ public: __u.__owns_ = false; return *this; } -#endif +#endif // _LIBCPP_MOVE void lock(); bool try_lock(); diff --git a/include/__split_buffer b/include/__split_buffer index efcf7ed7d..1a488370d 100644 --- a/include/__split_buffer +++ b/include/__split_buffer @@ -26,7 +26,7 @@ private: __split_buffer(const __split_buffer&); __split_buffer& operator=(const __split_buffer&); public: - typedef _Tp value_type; + typedef _Tp value_type; typedef _Allocator allocator_type; typedef typename remove_reference::type __alloc_rr; typedef allocator_traits<__alloc_rr> __alloc_traits; @@ -62,7 +62,7 @@ public: __split_buffer(__split_buffer&& __c); __split_buffer(__split_buffer&& __c, const __alloc_rr& __a); __split_buffer& operator=(__split_buffer&& __c); -#endif +#endif // _LIBCPP_MOVE _LIBCPP_INLINE_VISIBILITY iterator begin() {return __begin_;} _LIBCPP_INLINE_VISIBILITY const_iterator begin() const {return __begin_;} @@ -90,7 +90,7 @@ public: void push_back(value_type&& __x); template void emplace_back(_Args&&... __args); -#endif +#endif // _LIBCPP_MOVE _LIBCPP_INLINE_VISIBILITY void pop_front() {__destruct_at_begin(__begin_+1);} _LIBCPP_INLINE_VISIBILITY void pop_back() {__destruct_at_end(__end_-1);} @@ -425,7 +425,7 @@ __split_buffer<_Tp, _Allocator>::operator=(__split_buffer&& __c) return *this; } -#endif +#endif // _LIBCPP_MOVE template void @@ -463,7 +463,7 @@ __split_buffer<_Tp, _Allocator>::shrink_to_fit() #ifndef _LIBCPP_NO_EXCEPTIONS try { -#endif +#endif // _LIBCPP_NO_EXCEPTIONS __split_buffer __t(size(), 0, __alloc()); __t.__construct_at_end(move_iterator(__begin_), move_iterator(__end_)); @@ -477,7 +477,7 @@ __split_buffer<_Tp, _Allocator>::shrink_to_fit() catch (...) { } -#endif +#endif // _LIBCPP_NO_EXCEPTIONS } } @@ -542,7 +542,7 @@ __split_buffer<_Tp, _Allocator>::push_front(value_type&& __x) --__begin_; } -#endif +#endif // _LIBCPP_MOVE template _LIBCPP_INLINE_VISIBILITY inline @@ -637,7 +637,7 @@ __split_buffer<_Tp, _Allocator>::emplace_back(_Args&&... __args) ++__end_; } -#endif +#endif // _LIBCPP_MOVE _LIBCPP_END_NAMESPACE_STD diff --git a/include/__tree b/include/__tree index 18363dc53..7def15492 100644 --- a/include/__tree +++ b/include/__tree @@ -343,7 +343,7 @@ __tree_remove(_NodePtr __root, _NodePtr __z) // but copy __z's color. This does not impact __x or __w. if (__y != __z) { - // __z->__left_ != nulptr but __z->__right_ might == __x == nullptr + // __z->__left_ != nulptr but __z->__right_ might == __x == nullptr __y->__parent_ = __z->__parent_; if (__tree_is_left_child(__z)) __y->__parent_->__left_ = __y; @@ -413,8 +413,8 @@ __tree_remove(_NodePtr __root, _NodePtr __z) } // reset sibling, and it still can't be null __w = __tree_is_left_child(__x) ? - __x->__parent_->__right_ : - __x->__parent_->__left_; + __x->__parent_->__right_ : + __x->__parent_->__left_; // continue; } else // __w has a red child @@ -465,8 +465,8 @@ __tree_remove(_NodePtr __root, _NodePtr __z) } // reset sibling, and it still can't be null __w = __tree_is_left_child(__x) ? - __x->__parent_->__right_ : - __x->__parent_->__left_; + __x->__parent_->__right_ : + __x->__parent_->__left_; // continue; } else // __w has a red child @@ -496,7 +496,6 @@ __tree_remove(_NodePtr __root, _NodePtr __z) template class __map_node_destructor; - template class __tree_node_destructor { @@ -594,10 +593,10 @@ public: template explicit __tree_node(_Args&& ...__args) : __value_(_STD::forward<_Args>(__args)...) {} -#else +#else // _LIBCPP_MOVE explicit __tree_node(const value_type& __v) : __value_(__v) {} -#endif +#endif // _LIBCPP_MOVE }; template class __map_iterator; @@ -832,7 +831,7 @@ public: __tree(__tree&& __t); __tree(__tree&& __t, const allocator_type& __a); __tree& operator=(__tree&& __t); -#endif +#endif // _LIBCPP_MOVE ~__tree(); @@ -870,13 +869,13 @@ public: iterator __insert_multi(_V&& __v); template iterator __insert_multi(const_iterator __p, _V&& __v); -#else +#else // _LIBCPP_MOVE pair __insert_unique(const value_type& __v); iterator __insert_unique(const_iterator __p, const value_type& __v); iterator __insert_multi(const value_type& __v); iterator __insert_multi(const_iterator __p, const value_type& __v); -#endif +#endif // _LIBCPP_MOVE pair __node_insert_unique(__node_pointer __nd); iterator __node_insert_unique(const_iterator __p, @@ -971,7 +970,7 @@ private: #ifdef _LIBCPP_MOVE template __node_holder __construct_node(_Args&& ...__args); -#else +#else // _LIBCPP_MOVE __node_holder __construct_node(const value_type& __v); #endif @@ -1105,7 +1104,7 @@ __tree<_Tp, _Compare, _Allocator>::__assign_unique(_InputIterator __first, _Inpu #ifndef _LIBCPP_NO_EXCEPTIONS try { -#endif +#endif // _LIBCPP_NO_EXCEPTIONS for (; __cache != nullptr && __first != __last; ++__first) { __cache->__value_ = *__first; @@ -1122,7 +1121,7 @@ __tree<_Tp, _Compare, _Allocator>::__assign_unique(_InputIterator __first, _Inpu destroy(__cache); throw; } -#endif +#endif // _LIBCPP_NO_EXCEPTIONS if (__cache != nullptr) { while (__cache->__parent_ != nullptr) @@ -1145,7 +1144,7 @@ __tree<_Tp, _Compare, _Allocator>::__assign_multi(_InputIterator __first, _Input #ifndef _LIBCPP_NO_EXCEPTIONS try { -#endif +#endif // _LIBCPP_NO_EXCEPTIONS for (; __cache != nullptr && __first != __last; ++__first) { __cache->__value_ = *__first; @@ -1162,7 +1161,7 @@ __tree<_Tp, _Compare, _Allocator>::__assign_multi(_InputIterator __first, _Input destroy(__cache); throw; } -#endif +#endif // _LIBCPP_NO_EXCEPTIONS if (__cache != nullptr) { while (__cache->__parent_ != nullptr) @@ -1264,7 +1263,7 @@ __tree<_Tp, _Compare, _Allocator>::__move_assign(__tree& __t, false_type) #ifndef _LIBCPP_NO_EXCEPTIONS try { -#endif +#endif // _LIBCPP_NO_EXCEPTIONS while (__cache != nullptr && __t.size() != 0) { __cache->__value_ = _STD::move(__t.remove(__t.begin())->__value_); @@ -1281,7 +1280,7 @@ __tree<_Tp, _Compare, _Allocator>::__move_assign(__tree& __t, false_type) destroy(__cache); throw; } -#endif +#endif // _LIBCPP_NO_EXCEPTIONS if (__cache != nullptr) { while (__cache->__parent_ != nullptr) @@ -1303,7 +1302,7 @@ __tree<_Tp, _Compare, _Allocator>::operator=(__tree&& __t) return *this; } -#endif +#endif // _LIBCPP_MOVE template __tree<_Tp, _Compare, _Allocator>::~__tree() @@ -1727,7 +1726,7 @@ __tree<_Tp, _Compare, _Allocator>::__insert_multi(const_iterator __p, _V&& __v) return iterator(__h.release()); } -#else +#else // _LIBCPP_MOVE template typename __tree<_Tp, _Compare, _Allocator>::__node_holder @@ -1796,7 +1795,7 @@ __tree<_Tp, _Compare, _Allocator>::__insert_multi(const_iterator __p, const valu return iterator(__h.release()); } -#endif +#endif // _LIBCPP_MOVE template pair::iterator, bool> diff --git a/include/__tuple b/include/__tuple index 642cff865..7426ed392 100644 --- a/include/__tuple +++ b/include/__tuple @@ -21,7 +21,7 @@ #include <__tuple_03> -#else +#else // _LIBCPP_HAS_NO_VARIADICS _LIBCPP_BEGIN_NAMESPACE_STD @@ -41,7 +41,6 @@ template struct __tuple_like > : tru template struct __tuple_like > : true_type {}; template struct __tuple_like > : true_type {}; - template typename tuple_element<_Ip, tuple<_Tp...>>::type& get(tuple<_Tp...>&); diff --git a/include/__tuple_03 b/include/__tuple_03 index 39a3bf5df..417448b66 100644 --- a/include/__tuple_03 +++ b/include/__tuple_03 @@ -22,4 +22,4 @@ template class tuple_element; _LIBCPP_END_NAMESPACE_STD -#endif +#endif // _LIBCPP___TUPLE_03 diff --git a/include/algorithm b/include/algorithm index 4e9487b88..56426e773 100644 --- a/include/algorithm +++ b/include/algorithm @@ -469,21 +469,21 @@ template void sort_heap(RandomAccessIterator first, RandomAccessIterator last, Compare comp); -template +template bool - is_heap(RandomAccessIterator first, RandomAccessiterator last); + is_heap(RandomAccessIterator first, RandomAccessiterator last); -template +template bool - is_heap(RandomAccessIterator first, RandomAccessiterator last, Compare comp); + is_heap(RandomAccessIterator first, RandomAccessiterator last, Compare comp); -template +template RandomAccessIterator - is_heap_until(RandomAccessIterator first, RandomAccessiterator last); + is_heap_until(RandomAccessIterator first, RandomAccessiterator last); -template +template RandomAccessIterator - is_heap_until(RandomAccessIterator first, RandomAccessiterator last, Compare comp); + is_heap_until(RandomAccessIterator first, RandomAccessiterator last, Compare comp); template ForwardIterator @@ -567,7 +567,7 @@ template InputIterator2 first2, InputIterator2 last2, Compare comp); template - bool + bool next_permutation(BidirectionalIterator first, BidirectionalIterator last); template @@ -1200,7 +1200,7 @@ __search(_RandomAccessIterator1 __first1, _RandomAccessIterator1 __last1, break; ++__first1; } -#else // _LIBCPP_UNROLL_LOOPS +#else // !_LIBCPP_UNROLL_LOOPS for (_D1 __loop_unroll = (__s - __first1) / 4; __loop_unroll > 0; --__loop_unroll) { if (__pred(*__first1, *__first2)) @@ -1230,7 +1230,7 @@ __search(_RandomAccessIterator1 __first1, _RandomAccessIterator1 __last1, return __last1; } __phase2: -#endif // _LIBCPP_UNROLL_LOOPS +#endif // !_LIBCPP_UNROLL_LOOPS _RandomAccessIterator1 __m1 = __first1; _RandomAccessIterator2 __m2 = __first2; #if !_LIBCPP_UNROLL_LOOPS @@ -1245,7 +1245,7 @@ __search(_RandomAccessIterator1 __first1, _RandomAccessIterator1 __last1, break; } } -#else // _LIBCPP_UNROLL_LOOPS +#else // !_LIBCPP_UNROLL_LOOPS ++__m2; ++__m1; for (_D2 __loop_unroll = (__last2 - __m2) / 4; __loop_unroll > 0; --__loop_unroll) @@ -1281,7 +1281,7 @@ __search(_RandomAccessIterator1 __first1, _RandomAccessIterator1 __last1, } __continue: ++__first1; -#endif // _LIBCPP_UNROLL_LOOPS +#endif // !_LIBCPP_UNROLL_LOOPS } } @@ -1995,7 +1995,6 @@ __unique_copy(_InputIterator __first, _InputIterator __last, _ForwardIterator __ return __result; } - template inline _LIBCPP_INLINE_VISIBILITY _OutputIterator @@ -2123,7 +2122,7 @@ __rotate(_RandomAccessIterator __first, _RandomAccessIterator __middle, _RandomA { typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type; typedef typename iterator_traits<_RandomAccessIterator>::value_type value_type; - + if (__first == __middle) return __last; if (__middle == __last) @@ -3147,7 +3146,7 @@ is_sorted_until(_ForwardIterator __first, _ForwardIterator __last, _Compare __co return __last; } -template +template inline _LIBCPP_INLINE_VISIBILITY _ForwardIterator is_sorted_until(_ForwardIterator __first, _ForwardIterator __last) @@ -3165,7 +3164,7 @@ is_sorted(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp) return _STD::is_sorted_until(__first, __last, __comp) == __last; } -template +template inline _LIBCPP_INLINE_VISIBILITY bool is_sorted(_ForwardIterator __first, _ForwardIterator __last) @@ -3616,10 +3615,10 @@ sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __com typedef typename add_lvalue_reference<__debug_less<_Compare> >::type _Comp_ref; __debug_less<_Compare> __c(__comp); __sort<_Comp_ref>(__first, __last, __c); -#else +#else // _LIBCPP_DEBUG typedef typename add_lvalue_reference<_Compare>::type _Comp_ref; __sort<_Comp_ref>(__first, __last, __comp); -#endif +#endif // _LIBCPP_DEBUG } template @@ -3713,10 +3712,10 @@ lower_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __valu typedef typename add_lvalue_reference<__debug_less<_Compare> >::type _Comp_ref; __debug_less<_Compare> __c(__comp); return __lower_bound<_Comp_ref>(__first, __last, __value, __c); -#else +#else // _LIBCPP_DEBUG typedef typename add_lvalue_reference<_Compare>::type _Comp_ref; return __lower_bound<_Comp_ref>(__first, __last, __value, __comp); -#endif +#endif // _LIBCPP_DEBUG } template @@ -3761,10 +3760,10 @@ upper_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __valu typedef typename add_lvalue_reference<__debug_less<_Compare> >::type _Comp_ref; __debug_less<_Compare> __c(__comp); return __upper_bound<_Comp_ref>(__first, __last, __value, __c); -#else +#else // _LIBCPP_DEBUG typedef typename add_lvalue_reference<_Compare>::type _Comp_ref; return __upper_bound<_Comp_ref>(__first, __last, __value, __comp); -#endif +#endif // _LIBCPP_DEBUG } template @@ -3821,10 +3820,10 @@ equal_range(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __valu typedef typename add_lvalue_reference<__debug_less<_Compare> >::type _Comp_ref; __debug_less<_Compare> __c(__comp); return __equal_range<_Comp_ref>(__first, __last, __value, __c); -#else +#else // _LIBCPP_DEBUG typedef typename add_lvalue_reference<_Compare>::type _Comp_ref; return __equal_range<_Comp_ref>(__first, __last, __value, __comp); -#endif +#endif // _LIBCPP_DEBUG } template @@ -3856,10 +3855,10 @@ binary_search(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __va typedef typename add_lvalue_reference<__debug_less<_Compare> >::type _Comp_ref; __debug_less<_Compare> __c(__comp); return __binary_search<_Comp_ref>(__first, __last, __value, __c); -#else +#else // _LIBCPP_DEBUG typedef typename add_lvalue_reference<_Compare>::type _Comp_ref; return __binary_search<_Comp_ref>(__first, __last, __value, __comp); -#endif +#endif // _LIBCPP_DEBUG } template @@ -3906,10 +3905,10 @@ merge(_InputIterator1 __first1, _InputIterator1 __last1, typedef typename add_lvalue_reference<__debug_less<_Compare> >::type _Comp_ref; __debug_less<_Compare> __c(__comp); return _STD::__merge<_Comp_ref>(__first1, __last1, __first2, __last2, __result, __c); -#else +#else // _LIBCPP_DEBUG typedef typename add_lvalue_reference<_Compare>::type _Comp_ref; return _STD::__merge<_Comp_ref>(__first1, __last1, __first2, __last2, __result, __comp); -#endif +#endif // _LIBCPP_DEBUG } template @@ -4081,11 +4080,11 @@ inplace_merge(_BidirectionalIterator __first, _BidirectionalIterator __middle, _ __debug_less<_Compare> __c(__comp); return _STD::__inplace_merge<_Comp_ref>(__first, __middle, __last, __c, __len1, __len2, __buf.first, __buf.second); -#else +#else // _LIBCPP_DEBUG typedef typename add_lvalue_reference<_Compare>::type _Comp_ref; return _STD::__inplace_merge<_Comp_ref>(__first, __middle, __last, __comp, __len1, __len2, __buf.first, __buf.second); -#endif +#endif // _LIBCPP_DEBUG } template @@ -4291,10 +4290,10 @@ stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compar typedef typename add_lvalue_reference<__debug_less<_Compare> >::type _Comp_ref; __debug_less<_Compare> __c(__comp); __stable_sort<_Comp_ref>(__first, __last, __c, __len, __buf.first, __buf.second); -#else +#else // _LIBCPP_DEBUG typedef typename add_lvalue_reference<_Compare>::type _Comp_ref; __stable_sort<_Comp_ref>(__first, __last, __comp, __len, __buf.first, __buf.second); -#endif +#endif // _LIBCPP_DEBUG } template @@ -4334,7 +4333,7 @@ is_heap_until(_RandomAccessIterator __first, _RandomAccessIterator __last, _Comp return __last; } -template +template inline _LIBCPP_INLINE_VISIBILITY _RandomAccessIterator is_heap_until(_RandomAccessIterator __first, _RandomAccessIterator __last) @@ -4352,7 +4351,7 @@ is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __ return _STD::is_heap_until(__first, __last, __comp) == __last; } -template +template inline _LIBCPP_INLINE_VISIBILITY bool is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) @@ -4440,10 +4439,10 @@ push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare typedef typename add_lvalue_reference<__debug_less<_Compare> >::type _Comp_ref; __debug_less<_Compare> __c(__comp); __push_heap_back<_Comp_ref>(__first, __last, __c, __last - __first); -#else +#else // _LIBCPP_DEBUG typedef typename add_lvalue_reference<_Compare>::type _Comp_ref; __push_heap_back<_Comp_ref>(__first, __last, __comp, __last - __first); -#endif +#endif // _LIBCPP_DEBUG } template @@ -4478,10 +4477,10 @@ pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare _ typedef typename add_lvalue_reference<__debug_less<_Compare> >::type _Comp_ref; __debug_less<_Compare> __c(__comp); __pop_heap<_Comp_ref>(__first, __last, __c, __last - __first); -#else +#else // _LIBCPP_DEBUG typedef typename add_lvalue_reference<_Compare>::type _Comp_ref; __pop_heap<_Comp_ref>(__first, __last, __comp, __last - __first); -#endif +#endif // _LIBCPP_DEBUG } template @@ -4518,10 +4517,10 @@ make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare typedef typename add_lvalue_reference<__debug_less<_Compare> >::type _Comp_ref; __debug_less<_Compare> __c(__comp); __make_heap<_Comp_ref>(__first, __last, __c); -#else +#else // _LIBCPP_DEBUG typedef typename add_lvalue_reference<_Compare>::type _Comp_ref; __make_heap<_Comp_ref>(__first, __last, __comp); -#endif +#endif // _LIBCPP_DEBUG } template @@ -4552,10 +4551,10 @@ sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare typedef typename add_lvalue_reference<__debug_less<_Compare> >::type _Comp_ref; __debug_less<_Compare> __c(__comp); __sort_heap<_Comp_ref>(__first, __last, __c); -#else +#else // _LIBCPP_DEBUG typedef typename add_lvalue_reference<_Compare>::type _Comp_ref; __sort_heap<_Comp_ref>(__first, __last, __comp); -#endif +#endif // _LIBCPP_DEBUG } template @@ -4596,10 +4595,10 @@ partial_sort(_RandomAccessIterator __first, _RandomAccessIterator __middle, _Ran typedef typename add_lvalue_reference<__debug_less<_Compare> >::type _Comp_ref; __debug_less<_Compare> __c(__comp); __partial_sort<_Comp_ref>(__first, __middle, __last, __c); -#else +#else // _LIBCPP_DEBUG typedef typename add_lvalue_reference<_Compare>::type _Comp_ref; __partial_sort<_Comp_ref>(__first, __middle, __last, __comp); -#endif +#endif // _LIBCPP_DEBUG } template @@ -4646,10 +4645,10 @@ partial_sort_copy(_InputIterator __first, _InputIterator __last, typedef typename add_lvalue_reference<__debug_less<_Compare> >::type _Comp_ref; __debug_less<_Compare> __c(__comp); return __partial_sort_copy<_Comp_ref>(__first, __last, __result_first, __result_last, __c); -#else +#else // _LIBCPP_DEBUG typedef typename add_lvalue_reference<_Compare>::type _Comp_ref; return __partial_sort_copy<_Comp_ref>(__first, __last, __result_first, __result_last, __comp); -#endif +#endif // _LIBCPP_DEBUG } template @@ -4858,10 +4857,10 @@ nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, _RandomA typedef typename add_lvalue_reference<__debug_less<_Compare> >::type _Comp_ref; __debug_less<_Compare> __c(__comp); __nth_element<_Comp_ref>(__first, __nth, __last, __c); -#else +#else // _LIBCPP_DEBUG typedef typename add_lvalue_reference<_Compare>::type _Comp_ref; __nth_element<_Comp_ref>(__first, __nth, __last, __comp); -#endif +#endif // _LIBCPP_DEBUG } template @@ -4899,10 +4898,10 @@ includes(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __fi typedef typename add_lvalue_reference<__debug_less<_Compare> >::type _Comp_ref; __debug_less<_Compare> __c(__comp); return __includes<_Comp_ref>(__first1, __last1, __first2, __last2, __c); -#else +#else // _LIBCPP_DEBUG typedef typename add_lvalue_reference<_Compare>::type _Comp_ref; return __includes<_Comp_ref>(__first1, __last1, __first2, __last2, __comp); -#endif +#endif // _LIBCPP_DEBUG } template @@ -4952,10 +4951,10 @@ set_union(_InputIterator1 __first1, _InputIterator1 __last1, typedef typename add_lvalue_reference<__debug_less<_Compare> >::type _Comp_ref; __debug_less<_Compare> __c(__comp); return __set_union<_Comp_ref>(__first1, __last1, __first2, __last2, __result, __c); -#else +#else // _LIBCPP_DEBUG typedef typename add_lvalue_reference<_Compare>::type _Comp_ref; return __set_union<_Comp_ref>(__first1, __last1, __first2, __last2, __result, __comp); -#endif +#endif // _LIBCPP_DEBUG } template @@ -5004,10 +5003,10 @@ set_intersection(_InputIterator1 __first1, _InputIterator1 __last1, typedef typename add_lvalue_reference<__debug_less<_Compare> >::type _Comp_ref; __debug_less<_Compare> __c(__comp); return __set_intersection<_Comp_ref>(__first1, __last1, __first2, __last2, __result, __c); -#else +#else // _LIBCPP_DEBUG typedef typename add_lvalue_reference<_Compare>::type _Comp_ref; return __set_intersection<_Comp_ref>(__first1, __last1, __first2, __last2, __result, __comp); -#endif +#endif // _LIBCPP_DEBUG } template @@ -5058,10 +5057,10 @@ set_difference(_InputIterator1 __first1, _InputIterator1 __last1, typedef typename add_lvalue_reference<__debug_less<_Compare> >::type _Comp_ref; __debug_less<_Compare> __c(__comp); return __set_difference<_Comp_ref>(__first1, __last1, __first2, __last2, __result, __c); -#else +#else // _LIBCPP_DEBUG typedef typename add_lvalue_reference<_Compare>::type _Comp_ref; return __set_difference<_Comp_ref>(__first1, __last1, __first2, __last2, __result, __comp); -#endif +#endif // _LIBCPP_DEBUG } template @@ -5117,10 +5116,10 @@ set_symmetric_difference(_InputIterator1 __first1, _InputIterator1 __last1, typedef typename add_lvalue_reference<__debug_less<_Compare> >::type _Comp_ref; __debug_less<_Compare> __c(__comp); return __set_symmetric_difference<_Comp_ref>(__first1, __last1, __first2, __last2, __result, __c); -#else +#else // _LIBCPP_DEBUG typedef typename add_lvalue_reference<_Compare>::type _Comp_ref; return __set_symmetric_difference<_Comp_ref>(__first1, __last1, __first2, __last2, __result, __comp); -#endif +#endif // _LIBCPP_DEBUG } template @@ -5161,10 +5160,10 @@ lexicographical_compare(_InputIterator1 __first1, _InputIterator1 __last1, typedef typename add_lvalue_reference<__debug_less<_Compare> >::type _Comp_ref; __debug_less<_Compare> __c(__comp); return __lexicographical_compare<_Comp_ref>(__first1, __last1, __first2, __last2, __c); -#else +#else // _LIBCPP_DEBUG typedef typename add_lvalue_reference<_Compare>::type _Comp_ref; return __lexicographical_compare<_Comp_ref>(__first1, __last1, __first2, __last2, __comp); -#endif +#endif // _LIBCPP_DEBUG } template @@ -5216,15 +5215,15 @@ next_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last, typedef typename add_lvalue_reference<__debug_less<_Compare> >::type _Comp_ref; __debug_less<_Compare> __c(__comp); return __next_permutation<_Comp_ref>(__first, __last, __c); -#else +#else // _LIBCPP_DEBUG typedef typename add_lvalue_reference<_Compare>::type _Comp_ref; return __next_permutation<_Comp_ref>(__first, __last, __comp); -#endif +#endif // _LIBCPP_DEBUG } template inline _LIBCPP_INLINE_VISIBILITY -bool +bool next_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last) { return _STD::next_permutation(__first, __last, @@ -5269,10 +5268,10 @@ prev_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last, typedef typename add_lvalue_reference<__debug_less<_Compare> >::type _Comp_ref; __debug_less<_Compare> __c(__comp); return __prev_permutation<_Comp_ref>(__first, __last, __c); -#else +#else // _LIBCPP_DEBUG typedef typename add_lvalue_reference<_Compare>::type _Comp_ref; return __prev_permutation<_Comp_ref>(__first, __last, __comp); -#endif +#endif // _LIBCPP_DEBUG } template diff --git a/include/array b/include/array index dea565510..ce3168138 100644 --- a/include/array +++ b/include/array @@ -16,84 +16,84 @@ namespace std { -template +template struct array -{ - // types: - typedef T & reference; - typedef const T & const_reference; - typedef implementation defined iterator; - typedef implementation defined const_iterator; - typedef size_t size_type; - typedef ptrdiff_t difference_type; - typedef T value_type; +{ + // types: + typedef T & reference; + typedef const T & const_reference; + typedef implementation defined iterator; + typedef implementation defined const_iterator; + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef T value_type; typedef T* pointer; typedef const T* const_pointer; - typedef std::reverse_iterator reverse_iterator; - typedef std::reverse_iterator const_reverse_iterator; + typedef std::reverse_iterator reverse_iterator; + typedef std::reverse_iterator const_reverse_iterator; - // No explicit construct/copy/destroy for aggregate type - void fill(const T& u); + // No explicit construct/copy/destroy for aggregate type + void fill(const T& u); void swap(array& a); - // iterators: - iterator begin(); - const_iterator begin() const; - iterator end(); - const_iterator end() const; + // iterators: + iterator begin(); + const_iterator begin() const; + iterator end(); + const_iterator end() const; - reverse_iterator rbegin(); - const_reverse_iterator rbegin() const; - reverse_iterator rend(); - const_reverse_iterator rend() const; + reverse_iterator rbegin(); + const_reverse_iterator rbegin() const; + reverse_iterator rend(); + const_reverse_iterator rend() const; - const_iterator cbegin() const; - const_iterator cend() const; + const_iterator cbegin() const; + const_iterator cend() const; const_reverse_iterator crbegin() const; - const_reverse_iterator crend() const; + const_reverse_iterator crend() const; - // capacity: - constexpr size_type size() const; - constexpr size_type max_size() const; - bool empty() const; + // capacity: + constexpr size_type size() const; + constexpr size_type max_size() const; + bool empty() const; - // element access: - reference operator[](size_type n); - const_reference operator[](size_type n) const; - const_reference at(size_type n) const; - reference at(size_type n); + // element access: + reference operator[](size_type n); + const_reference operator[](size_type n) const; + const_reference at(size_type n) const; + reference at(size_type n); - reference front(); - const_reference front() const; - reference back(); - const_reference back() const; + reference front(); + const_reference front() const; + reference back(); + const_reference back() const; - T* data(); - const T* data() const; + T* data(); + const T* data() const; }; -template - bool operator==(const array& x, const array& y); -template - bool operator!=(const array& x, const array& y); -template - bool operator<(const array& x, const array& y); -template - bool operator>(const array& x, const array& y); -template - bool operator<=(const array& x, const array& y); -template - bool operator>=(const array& x, const array& y); +template + bool operator==(const array& x, const array& y); +template + bool operator!=(const array& x, const array& y); +template + bool operator<(const array& x, const array& y); +template + bool operator>(const array& x, const array& y); +template + bool operator<=(const array& x, const array& y); +template + bool operator>=(const array& x, const array& y); -template - void swap(array& x, array& y); +template + void swap(array& x, array& y); -template class tuple_size; -template class tuple_element; +template class tuple_size; +template class tuple_element; template struct tuple_size>; -template struct tuple_element>; -template T& get(array&); -template const T& get(const array&); +template struct tuple_element>; +template T& get(array&); +template const T& get(const array&); } // std @@ -114,30 +114,30 @@ template const T& get(const array&); _LIBCPP_BEGIN_NAMESPACE_STD -template +template struct array { // types: typedef array __self; - typedef _Tp value_type; - typedef value_type& reference; - typedef const value_type& const_reference; + typedef _Tp value_type; + typedef value_type& reference; + typedef const value_type& const_reference; typedef value_type* iterator; typedef const value_type* const_iterator; typedef value_type* pointer; typedef const value_type* const_pointer; - typedef size_t size_type; - typedef ptrdiff_t difference_type; - typedef std::reverse_iterator reverse_iterator; - typedef std::reverse_iterator const_reverse_iterator; + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef std::reverse_iterator reverse_iterator; + typedef std::reverse_iterator const_reverse_iterator; value_type __elems_[_Size > 0 ? _Size : 1]; - // No explicit construct/copy/destroy for aggregate type + // No explicit construct/copy/destroy for aggregate type _LIBCPP_INLINE_VISIBILITY void fill(const value_type& __u) {_STD::fill_n(__elems_, _Size, __u);} _LIBCPP_INLINE_VISIBILITY void swap(array& __a) {_STD::swap_ranges(__elems_, __elems_ + _Size, __a.__elems_);} - // iterators: + // iterators: _LIBCPP_INLINE_VISIBILITY iterator begin() {return iterator(__elems_);} _LIBCPP_INLINE_VISIBILITY const_iterator begin() const {return const_iterator(__elems_);} _LIBCPP_INLINE_VISIBILITY iterator end() {return iterator(__elems_ + _Size);} @@ -153,16 +153,16 @@ struct array _LIBCPP_INLINE_VISIBILITY const_reverse_iterator crbegin() const {return rbegin();} _LIBCPP_INLINE_VISIBILITY const_reverse_iterator crend() const {return rend();} - // capacity: + // capacity: _LIBCPP_INLINE_VISIBILITY /*constexpr*/ size_type size() const {return _Size;} _LIBCPP_INLINE_VISIBILITY /*constexpr*/ size_type max_size() const {return _Size;} _LIBCPP_INLINE_VISIBILITY bool empty() const {return _Size == 0;} - // element access: + // element access: _LIBCPP_INLINE_VISIBILITY reference operator[](size_type __n) {return __elems_[__n];} _LIBCPP_INLINE_VISIBILITY const_reference operator[](size_type __n) const {return __elems_[__n];} - reference at(size_type __n); - const_reference at(size_type __n) const; + reference at(size_type __n); + const_reference at(size_type __n) const; _LIBCPP_INLINE_VISIBILITY reference front() {return __elems_[0];} _LIBCPP_INLINE_VISIBILITY const_reference front() const {return __elems_[0];} @@ -170,10 +170,10 @@ struct array _LIBCPP_INLINE_VISIBILITY const_reference back() const {return __elems_[_Size > 0 ? _Size-1 : 0];} _LIBCPP_INLINE_VISIBILITY value_type* data() {return __elems_;} - _LIBCPP_INLINE_VISIBILITY const value_type* data() const {return __elems_;} + _LIBCPP_INLINE_VISIBILITY const value_type* data() const {return __elems_;} }; -template +template typename array<_Tp, _Size>::reference array<_Tp, _Size>::at(size_type __n) { @@ -186,7 +186,7 @@ array<_Tp, _Size>::at(size_type __n) return __elems_[__n]; } -template +template typename array<_Tp, _Size>::const_reference array<_Tp, _Size>::at(size_type __n) const { @@ -199,7 +199,7 @@ array<_Tp, _Size>::at(size_type __n) const return __elems_[__n]; } -template +template _LIBCPP_INLINE_VISIBILITY inline bool operator==(const array<_Tp, _Size>& __x, const array<_Tp, _Size>& __y) @@ -207,7 +207,7 @@ operator==(const array<_Tp, _Size>& __x, const array<_Tp, _Size>& __y) return _STD::equal(__x.__elems_, __x.__elems_ + _Size, __y.__elems_); } -template +template _LIBCPP_INLINE_VISIBILITY inline bool operator!=(const array<_Tp, _Size>& __x, const array<_Tp, _Size>& __y) @@ -215,7 +215,7 @@ operator!=(const array<_Tp, _Size>& __x, const array<_Tp, _Size>& __y) return !(__x == __y); } -template +template _LIBCPP_INLINE_VISIBILITY inline bool operator<(const array<_Tp, _Size>& __x, const array<_Tp, _Size>& __y) @@ -223,7 +223,7 @@ operator<(const array<_Tp, _Size>& __x, const array<_Tp, _Size>& __y) return _STD::lexicographical_compare(__x.__elems_, __x.__elems_ + _Size, __y.__elems_, __y.__elems_ + _Size); } -template +template _LIBCPP_INLINE_VISIBILITY inline bool operator>(const array<_Tp, _Size>& __x, const array<_Tp, _Size>& __y) @@ -231,7 +231,7 @@ operator>(const array<_Tp, _Size>& __x, const array<_Tp, _Size>& __y) return __y < __x; } -template +template _LIBCPP_INLINE_VISIBILITY inline bool operator<=(const array<_Tp, _Size>& __x, const array<_Tp, _Size>& __y) @@ -239,7 +239,7 @@ operator<=(const array<_Tp, _Size>& __x, const array<_Tp, _Size>& __y) return !(__y < __x); } -template +template _LIBCPP_INLINE_VISIBILITY inline bool operator>=(const array<_Tp, _Size>& __x, const array<_Tp, _Size>& __y) @@ -247,7 +247,7 @@ operator>=(const array<_Tp, _Size>& __x, const array<_Tp, _Size>& __y) return !(__x < __y); } -template +template _LIBCPP_INLINE_VISIBILITY inline void swap(const array<_Tp, _Size>& __x, const array<_Tp, _Size>& __y) diff --git a/include/bitset b/include/bitset index 7ec860e39..ecf9a5705 100644 --- a/include/bitset +++ b/include/bitset @@ -598,61 +598,61 @@ class bitset static const unsigned __n_words = _Size == 0 ? 0 : (_Size - 1) / (sizeof(size_t) * CHAR_BIT) + 1; typedef __bitset<__n_words, _Size> base; -public: +public: typedef typename base::reference reference; typedef typename base::const_reference const_reference; - // 23.3.5.1 constructors: + // 23.3.5.1 constructors: /*constexpr*/ _LIBCPP_INLINE_VISIBILITY bitset() {} /*constexpr*/ _LIBCPP_INLINE_VISIBILITY bitset(unsigned long long __v) : base(__v) {} explicit bitset(const char* __str); - template - explicit bitset(const basic_string<_CharT,_Traits,_Allocator>& __str, - typename basic_string<_CharT,_Traits,_Allocator>::size_type __pos = 0, - typename basic_string<_CharT,_Traits,_Allocator>::size_type __n = + template + explicit bitset(const basic_string<_CharT,_Traits,_Allocator>& __str, + typename basic_string<_CharT,_Traits,_Allocator>::size_type __pos = 0, + typename basic_string<_CharT,_Traits,_Allocator>::size_type __n = (basic_string<_CharT,_Traits,_Allocator>::npos), - _CharT __zero = _CharT('0'), _CharT __one = _CharT('1')); + _CharT __zero = _CharT('0'), _CharT __one = _CharT('1')); - // 23.3.5.2 bitset operations: + // 23.3.5.2 bitset operations: bitset& operator&=(const bitset& __rhs); - bitset& operator|=(const bitset& __rhs); - bitset& operator^=(const bitset& __rhs); - bitset& operator<<=(size_t __pos); - bitset& operator>>=(size_t __pos); - bitset& set(); - bitset& set(size_t __pos, bool __val = true); - bitset& reset(); - bitset& reset(size_t __pos); - bitset operator~() const; - bitset& flip(); - bitset& flip(size_t __pos); + bitset& operator|=(const bitset& __rhs); + bitset& operator^=(const bitset& __rhs); + bitset& operator<<=(size_t __pos); + bitset& operator>>=(size_t __pos); + bitset& set(); + bitset& set(size_t __pos, bool __val = true); + bitset& reset(); + bitset& reset(size_t __pos); + bitset operator~() const; + bitset& flip(); + bitset& flip(size_t __pos); - // element access: + // element access: _LIBCPP_INLINE_VISIBILITY const_reference operator[](size_t __p) const {return base::__make_ref(__p);} _LIBCPP_INLINE_VISIBILITY reference operator[](size_t __p) {return base::__make_ref(__p);} - unsigned long to_ulong() const; - unsigned long long to_ullong() const; - template + unsigned long to_ulong() const; + unsigned long long to_ullong() const; + template basic_string<_CharT, _Traits, _Allocator> to_string(_CharT __zero = _CharT('0'), - _CharT __one = _CharT('1')) const; - template + _CharT __one = _CharT('1')) const; + template basic_string<_CharT, _Traits, allocator<_CharT> > to_string(_CharT __zero = _CharT('0'), - _CharT __one = _CharT('1')) const; - template + _CharT __one = _CharT('1')) const; + template basic_string<_CharT, char_traits<_CharT>, allocator<_CharT> > to_string(_CharT __zero = _CharT('0'), - _CharT __one = _CharT('1')) const; + _CharT __one = _CharT('1')) const; basic_string, allocator > to_string(char __zero = '0', - char __one = '1') const; + char __one = '1') const; size_t count() const; /*constexpr*/ _LIBCPP_INLINE_VISIBILITY size_t size() const {return _Size;} - bool operator==(const bitset& __rhs) const; - bool operator!=(const bitset& __rhs) const; - bool test(size_t __pos) const; - bool all() const; - bool any() const; + bool operator==(const bitset& __rhs) const; + bool operator!=(const bitset& __rhs) const; + bool test(size_t __pos) const; + bool all() const; + bool any() const; _LIBCPP_INLINE_VISIBILITY bool none() const {return !any();} - bitset operator<<(size_t __pos) const; - bitset operator>>(size_t __pos) const; + bitset operator<<(size_t __pos) const; + bitset operator>>(size_t __pos) const; private: @@ -690,9 +690,9 @@ bitset<_Size>::bitset(const char* __str) } template -template -bitset<_Size>::bitset(const basic_string<_CharT,_Traits,_Allocator>& __str, - typename basic_string<_CharT,_Traits,_Allocator>::size_type __pos, +template +bitset<_Size>::bitset(const basic_string<_CharT,_Traits,_Allocator>& __str, + typename basic_string<_CharT,_Traits,_Allocator>::size_type __pos, typename basic_string<_CharT,_Traits,_Allocator>::size_type __n, _CharT __zero, _CharT __one) { @@ -867,7 +867,7 @@ bitset<_Size>::to_ullong() const } template -template +template basic_string<_CharT, _Traits, _Allocator> bitset<_Size>::to_string(_CharT __zero, _CharT __one) const { @@ -881,7 +881,7 @@ bitset<_Size>::to_string(_CharT __zero, _CharT __one) const } template -template +template inline _LIBCPP_INLINE_VISIBILITY basic_string<_CharT, _Traits, allocator<_CharT> > bitset<_Size>::to_string(_CharT __zero, _CharT __one) const @@ -890,7 +890,7 @@ bitset<_Size>::to_string(_CharT __zero, _CharT __one) const } template -template +template inline _LIBCPP_INLINE_VISIBILITY basic_string<_CharT, char_traits<_CharT>, allocator<_CharT> > bitset<_Size>::to_string(_CharT __zero, _CharT __one) const diff --git a/include/cerrno b/include/cerrno index f96ea0ab1..028a388de 100644 --- a/include/cerrno +++ b/include/cerrno @@ -44,14 +44,14 @@ const int __elast2 = ELAST+2; #define ENOTRECOVERABLE __elast1 #define ELAST ENOTRECOVERABLE -#else +#else // defined(EOWNERDEAD) #define EOWNERDEAD __elast1 #define ENOTRECOVERABLE __elast2 #define ELAST ENOTRECOVERABLE -#endif +#endif // defined(EOWNERDEAD) -#endif +#endif // !defined(EOWNERDEAD) || !defined(ENOTRECOVERABLE) #endif // _LIBCPP_CERRNO diff --git a/include/cmath b/include/cmath index f133de98f..7ddb5fd4b 100644 --- a/include/cmath +++ b/include/cmath @@ -141,17 +141,17 @@ bool signbit(floating_point x); int fpclassify(floating_point x); -bool isfinite(floating_point x); -bool isinf(floating_point x); -bool isnan(floating_point x); -bool isnormal(floating_point x); +bool isfinite(floating_point x); +bool isinf(floating_point x); +bool isnan(floating_point x); +bool isnormal(floating_point x); -bool isgreater(floating_point x, floating_point y); -bool isgreaterequal(floating_point x, floating_point y); -bool isless(floating_point x, floating_point y); -bool islessequal(floating_point x, floating_point y); -bool islessgreater(floating_point x, floating_point y); -bool isunordered(floating_point x, floating_point y); +bool isgreater(floating_point x, floating_point y); +bool isgreaterequal(floating_point x, floating_point y); +bool isless(floating_point x, floating_point y); +bool islessequal(floating_point x, floating_point y); +bool islessgreater(floating_point x, floating_point y); +bool isunordered(floating_point x, floating_point y); floating_point acosh (arithmetic x); float acoshf(float x); @@ -297,11 +297,11 @@ long double truncl(long double x); */ -// FIXME: work around for Clang with -std=C++0x on OSX/iOS +// FIXME: work around for Clang with -std=C++0x on OSX/iOS #if defined(__clang__) && defined(__APPLE__) # pragma push_macro("__STRICT_ANSI__") # undef __STRICT_ANSI__ -#endif +#endif // defined(__clang__) && defined(__APPLE__) #include <__config> #include diff --git a/include/complex b/include/complex index ef5695215..96eeff64e 100644 --- a/include/complex +++ b/include/complex @@ -49,89 +49,89 @@ public: template<> class complex -{ -public: - typedef float value_type; +{ +public: + typedef float value_type; - constexpr complex(float re = 0.0f, float im = 0.0f); - explicit constexpr complex(const complex&); - explicit constexpr complex(const complex&); + constexpr complex(float re = 0.0f, float im = 0.0f); + explicit constexpr complex(const complex&); + explicit constexpr complex(const complex&); - constexpr float real() const; + constexpr float real() const; void real(float); - constexpr float imag() const; + constexpr float imag() const; void imag(float); - complex& operator= (float); - complex& operator+=(float); - complex& operator-=(float); - complex& operator*=(float); - complex& operator/=(float); + complex& operator= (float); + complex& operator+=(float); + complex& operator-=(float); + complex& operator*=(float); + complex& operator/=(float); - complex& operator=(const complex&); - template complex& operator= (const complex&); - template complex& operator+=(const complex&); - template complex& operator-=(const complex&); - template complex& operator*=(const complex&); - template complex& operator/=(const complex&); + complex& operator=(const complex&); + template complex& operator= (const complex&); + template complex& operator+=(const complex&); + template complex& operator-=(const complex&); + template complex& operator*=(const complex&); + template complex& operator/=(const complex&); }; template<> class complex -{ -public: - typedef double value_type; +{ +public: + typedef double value_type; - constexpr complex(double re = 0.0, double im = 0.0); - constexpr complex(const complex&); - explicit constexpr complex(const complex&); + constexpr complex(double re = 0.0, double im = 0.0); + constexpr complex(const complex&); + explicit constexpr complex(const complex&); - constexpr double real() const; + constexpr double real() const; void real(double); - constexpr double imag() const; + constexpr double imag() const; void imag(double); - complex& operator= (double); - complex& operator+=(double); - complex& operator-=(double); - complex& operator*=(double); - complex& operator/=(double); - complex& operator=(const complex&); + complex& operator= (double); + complex& operator+=(double); + complex& operator-=(double); + complex& operator*=(double); + complex& operator/=(double); + complex& operator=(const complex&); - template complex& operator= (const complex&); - template complex& operator+=(const complex&); - template complex& operator-=(const complex&); - template complex& operator*=(const complex&); - template complex& operator/=(const complex&); -}; + template complex& operator= (const complex&); + template complex& operator+=(const complex&); + template complex& operator-=(const complex&); + template complex& operator*=(const complex&); + template complex& operator/=(const complex&); +}; template<> class complex -{ -public: - typedef long double value_type; +{ +public: + typedef long double value_type; - constexpr complex(long double re = 0.0L, long double im = 0.0L); - constexpr complex(const complex&); - constexpr complex(const complex&); + constexpr complex(long double re = 0.0L, long double im = 0.0L); + constexpr complex(const complex&); + constexpr complex(const complex&); - constexpr long double real() const; + constexpr long double real() const; void real(long double); - constexpr long double imag() const; + constexpr long double imag() const; void imag(long double); - complex& operator=(const complex&); - complex& operator= (long double); - complex& operator+=(long double); - complex& operator-=(long double); - complex& operator*=(long double); - complex& operator/=(long double); + complex& operator=(const complex&); + complex& operator= (long double); + complex& operator+=(long double); + complex& operator-=(long double); + complex& operator*=(long double); + complex& operator/=(long double); - template complex& operator= (const complex&); - template complex& operator+=(const complex&); - template complex& operator-=(const complex&); - template complex& operator*=(const complex&); - template complex& operator/=(const complex&); + template complex& operator= (const complex&); + template complex& operator+=(const complex&); + template complex& operator-=(const complex&); + template complex& operator*=(const complex&); + template complex& operator/=(const complex&); }; // 26.3.6 operators: @@ -321,11 +321,11 @@ template<> class complex; template<> class complex -{ +{ float __re_; float __im_; -public: - typedef float value_type; +public: + typedef float value_type; /*constexpr*/ _LIBCPP_INLINE_VISIBILITY complex(float __re = 0.0f, float __im = 0.0f) : __re_(__re), __im_(__im) {} @@ -376,11 +376,11 @@ public: template<> class complex -{ +{ double __re_; double __im_; -public: - typedef double value_type; +public: + typedef double value_type; /*constexpr*/ _LIBCPP_INLINE_VISIBILITY complex(double __re = 0.0, double __im = 0.0) : __re_(__re), __im_(__im) {} @@ -427,15 +427,15 @@ public: *this = *this / __c; return *this; } -}; +}; template<> class complex -{ +{ long double __re_; long double __im_; -public: - typedef long double value_type; +public: + typedef long double value_type; /*constexpr*/ _LIBCPP_INLINE_VISIBILITY complex(long double __re = 0.0L, long double __im = 0.0L) : __re_(__re), __im_(__im) {} diff --git a/include/complex.h b/include/complex.h index 95aaa71ef..4960944a1 100644 --- a/include/complex.h +++ b/include/complex.h @@ -22,11 +22,11 @@ #include -#else +#else // __cplusplus #include_next -#endif +#endif // __cplusplus #pragma GCC system_header diff --git a/include/csignal b/include/csignal index aef1c04bb..959f8b80d 100644 --- a/include/csignal +++ b/include/csignal @@ -25,7 +25,7 @@ Macros: SIGINT SIGSEGV SIGTERM - + namespace std { diff --git a/include/cstdarg b/include/cstdarg index 926a38ff7..ccff0d613 100644 --- a/include/cstdarg +++ b/include/cstdarg @@ -20,7 +20,7 @@ Macros: void va_copy(va_list dest, va_list src); // C99 void va_end(va_list ap); void va_start(va_list ap, parmN); - + namespace std { diff --git a/include/cstddef b/include/cstddef index 8cba5f8a2..a5297ec15 100644 --- a/include/cstddef +++ b/include/cstddef @@ -18,7 +18,7 @@ Macros: offsetof(type,member-designator) NULL - + namespace std { @@ -39,7 +39,7 @@ Types: #define __need_NULL #define __need_ptrdiff_t #define __need_size_t -#endif +#endif // __GLIBC__ #include @@ -65,11 +65,11 @@ struct nullptr_t _LIBCPP_ALWAYS_INLINE operator int __nat::*() const {return 0;} template - _LIBCPP_ALWAYS_INLINE + _LIBCPP_ALWAYS_INLINE operator _Tp* () const {return 0;} template - _LIBCPP_ALWAYS_INLINE + _LIBCPP_ALWAYS_INLINE operator _Tp _Up::* () const {return 0;} friend _LIBCPP_ALWAYS_INLINE bool operator==(nullptr_t, nullptr_t) {return true;} @@ -120,11 +120,11 @@ inline _LIBCPP_ALWAYS_INLINE nullptr_t __get_nullptr_t() {return nullptr_t(0);} #define nullptr _STD::__get_nullptr_t() -#else +#else // _LIBCPP_HAS_NO_NULLPTR typedef decltype(nullptr) nullptr_t; -#endif +#endif // _LIBCPP_HAS_NO_NULLPTR _LIBCPP_END_NAMESPACE_STD diff --git a/include/cstdlib b/include/cstdlib index 1e5ed4855..30c8342c4 100644 --- a/include/cstdlib +++ b/include/cstdlib @@ -21,7 +21,7 @@ Macros: MB_CUR_MAX NULL RAND_MAX - + namespace std { @@ -66,7 +66,7 @@ long labs( long j); long long llabs(long long j); // C99 div_t div( int numer, int denom); ldiv_t div( long numer, long denom); -lldiv_t div(long long numer, long long denom); // C++0X +lldiv_t div(long long numer, long long denom); // C++0X ldiv_t ldiv( long numer, long denom); lldiv_t lldiv(long long numer, long long denom); // C99 int mblen(const char* s, size_t n); diff --git a/include/cstring b/include/cstring index b2305a3c3..06521d1e6 100644 --- a/include/cstring +++ b/include/cstring @@ -17,7 +17,7 @@ Macros: NULL - + namespace std { diff --git a/include/ctime b/include/ctime index 11babba02..818464bd5 100644 --- a/include/ctime +++ b/include/ctime @@ -18,7 +18,7 @@ Macros: NULL CLOCKS_PER_SEC - + namespace std { diff --git a/include/cwchar b/include/cwchar index abbf96861..2f9f218a0 100644 --- a/include/cwchar +++ b/include/cwchar @@ -20,7 +20,7 @@ Macros: WCHAR_MAX WCHAR_MIN WEOF - + namespace std { @@ -49,7 +49,7 @@ wint_t fputwc(wchar_t c, FILE* stream); int fputws(const wchar_t* restrict s, FILE* restrict stream); int fwide(FILE* stream, int mode); wint_t getwc(FILE* stream); -wint_t getwchar(); +wint_t getwchar(); wint_t putwc(wchar_t c, FILE* stream); wint_t putwchar(wchar_t c); wint_t ungetwc(wint_t c, FILE* stream); @@ -92,10 +92,10 @@ wint_t btowc(int c); int wctob(wint_t c); int mbsinit(const mbstate_t* ps); size_t mbrlen(const char* restrict s, size_t n, mbstate_t* restrict ps); -size_t mbrtowc(wchar_t* restrict pwc, const char* restrict s, size_t n, mbstate_t* restrict ps); +size_t mbrtowc(wchar_t* restrict pwc, const char* restrict s, size_t n, mbstate_t* restrict ps); size_t wcrtomb(char* restrict s, wchar_t wc, mbstate_t* restrict ps); size_t mbsrtowcs(wchar_t* restrict dst, const char** restrict src, size_t len, - mbstate_t* restrict ps); + mbstate_t* restrict ps); size_t wcsrtombs(char* restrict dst, const wchar_t** restrict src, size_t len, mbstate_t* restrict ps); diff --git a/include/cwctype b/include/cwctype index c6938e7df..b48487957 100644 --- a/include/cwctype +++ b/include/cwctype @@ -17,7 +17,7 @@ Macros: WEOF - + namespace std { @@ -66,7 +66,7 @@ using ::wctype_t; inline _LIBCPP_INLINE_VISIBILITY int __libcpp_iswalnum(wint_t __wc) {return iswalnum(__wc);} #undef iswalnum inline _LIBCPP_INLINE_VISIBILITY int iswalnum(wint_t __wc) {return __libcpp_iswalnum(__wc);} -#else +#else // iswalnum using ::iswalnum; #endif @@ -74,7 +74,7 @@ using ::iswalnum; inline _LIBCPP_INLINE_VISIBILITY int __libcpp_iswalpha(wint_t __wc) {return iswalpha(__wc);} #undef iswalpha inline _LIBCPP_INLINE_VISIBILITY int iswalpha(wint_t __wc) {return __libcpp_iswalpha(__wc);} -#else +#else // iswalpha using ::iswalpha; #endif @@ -82,7 +82,7 @@ using ::iswalpha; inline _LIBCPP_INLINE_VISIBILITY int __libcpp_iswblank(wint_t __wc) {return iswblank(__wc);} #undef iswblank inline _LIBCPP_INLINE_VISIBILITY int iswblank(wint_t __wc) {return __libcpp_iswblank(__wc);} -#else +#else // iswblank using ::iswblank; #endif @@ -90,7 +90,7 @@ using ::iswblank; inline _LIBCPP_INLINE_VISIBILITY int __libcpp_iswcntrl(wint_t __wc) {return iswcntrl(__wc);} #undef iswcntrl inline _LIBCPP_INLINE_VISIBILITY int iswcntrl(wint_t __wc) {return __libcpp_iswcntrl(__wc);} -#else +#else // iswcntrl using ::iswcntrl; #endif @@ -98,7 +98,7 @@ using ::iswcntrl; inline _LIBCPP_INLINE_VISIBILITY int __libcpp_iswdigit(wint_t __wc) {return iswdigit(__wc);} #undef iswdigit inline _LIBCPP_INLINE_VISIBILITY int iswdigit(wint_t __wc) {return __libcpp_iswdigit(__wc);} -#else +#else // iswdigit using ::iswdigit; #endif @@ -106,7 +106,7 @@ using ::iswdigit; inline _LIBCPP_INLINE_VISIBILITY int __libcpp_iswgraph(wint_t __wc) {return iswgraph(__wc);} #undef iswgraph inline _LIBCPP_INLINE_VISIBILITY int iswgraph(wint_t __wc) {return __libcpp_iswgraph(__wc);} -#else +#else // iswgraph using ::iswgraph; #endif @@ -114,7 +114,7 @@ using ::iswgraph; inline _LIBCPP_INLINE_VISIBILITY int __libcpp_iswlower(wint_t __wc) {return iswlower(__wc);} #undef iswlower inline _LIBCPP_INLINE_VISIBILITY int iswlower(wint_t __wc) {return __libcpp_iswlower(__wc);} -#else +#else // iswlower using ::iswlower; #endif @@ -122,7 +122,7 @@ using ::iswlower; inline _LIBCPP_INLINE_VISIBILITY int __libcpp_iswprint(wint_t __wc) {return iswprint(__wc);} #undef iswprint inline _LIBCPP_INLINE_VISIBILITY int iswprint(wint_t __wc) {return __libcpp_iswprint(__wc);} -#else +#else // iswprint using ::iswprint; #endif @@ -130,7 +130,7 @@ using ::iswprint; inline _LIBCPP_INLINE_VISIBILITY int __libcpp_iswpunct(wint_t __wc) {return iswpunct(__wc);} #undef iswpunct inline _LIBCPP_INLINE_VISIBILITY int iswpunct(wint_t __wc) {return __libcpp_iswpunct(__wc);} -#else +#else // iswpunct using ::iswpunct; #endif @@ -138,7 +138,7 @@ using ::iswpunct; inline _LIBCPP_INLINE_VISIBILITY int __libcpp_iswspace(wint_t __wc) {return iswspace(__wc);} #undef iswspace inline _LIBCPP_INLINE_VISIBILITY int iswspace(wint_t __wc) {return __libcpp_iswspace(__wc);} -#else +#else // iswspace using ::iswspace; #endif @@ -146,7 +146,7 @@ using ::iswspace; inline _LIBCPP_INLINE_VISIBILITY int __libcpp_iswupper(wint_t __wc) {return iswupper(__wc);} #undef iswupper inline _LIBCPP_INLINE_VISIBILITY int iswupper(wint_t __wc) {return __libcpp_iswupper(__wc);} -#else +#else // iswupper using ::iswupper; #endif @@ -154,7 +154,7 @@ using ::iswupper; inline _LIBCPP_INLINE_VISIBILITY int __libcpp_iswxdigit(wint_t __wc) {return iswxdigit(__wc);} #undef iswxdigit inline _LIBCPP_INLINE_VISIBILITY int iswxdigit(wint_t __wc) {return __libcpp_iswxdigit(__wc);} -#else +#else // iswxdigit using ::iswxdigit; #endif @@ -162,7 +162,7 @@ using ::iswxdigit; inline _LIBCPP_INLINE_VISIBILITY int __libcpp_iswctype(wint_t __w, wctype_t __d) {return iswctype(__w, __d);} #undef iswctype inline _LIBCPP_INLINE_VISIBILITY int iswctype(wint_t __w, wctype_t __d) {return __libcpp_iswctype(__w, __d);} -#else +#else // iswctype using ::iswctype; #endif @@ -170,7 +170,7 @@ using ::iswctype; inline _LIBCPP_INLINE_VISIBILITY wctype_t __libcpp_wctype(const char* __p) {return wctype(__p);} #undef wctype inline _LIBCPP_INLINE_VISIBILITY wctype_t wctype(const char* __p) {return __libcpp_wctype(__p);} -#else +#else // wctype using ::wctype; #endif @@ -178,7 +178,7 @@ using ::wctype; inline _LIBCPP_INLINE_VISIBILITY wint_t __libcpp_towlower(wint_t __wc) {return towlower(__wc);} #undef towlower inline _LIBCPP_INLINE_VISIBILITY wint_t towlower(wint_t __wc) {return __libcpp_towlower(__wc);} -#else +#else // towlower using ::towlower; #endif @@ -186,7 +186,7 @@ using ::towlower; inline _LIBCPP_INLINE_VISIBILITY wint_t __libcpp_towupper(wint_t __wc) {return towupper(__wc);} #undef towupper inline _LIBCPP_INLINE_VISIBILITY wint_t towupper(wint_t __wc) {return __libcpp_towupper(__wc);} -#else +#else // towupper using ::towupper; #endif @@ -194,7 +194,7 @@ using ::towupper; inline _LIBCPP_INLINE_VISIBILITY wint_t __libcpp_towctrans(wint_t __wc, wctype_t __d) {return towctrans(__wc, __d);} #undef towctrans inline _LIBCPP_INLINE_VISIBILITY wint_t towctrans(wint_t __wc, wctype_t __d) {return __libcpp_towctrans(__wc, __d);} -#else +#else // towctrans using ::towctrans; #endif @@ -202,7 +202,7 @@ using ::towctrans; inline _LIBCPP_INLINE_VISIBILITY wctrans_t __libcpp_wctrans(const char* __p) {return wctrans(__p);} #undef wctrans inline _LIBCPP_INLINE_VISIBILITY wctrans_t wctrans(const char* __p) {return __libcpp_wctrans(__p);} -#else +#else // wctrans using ::wctrans; #endif diff --git a/include/deque b/include/deque index c4e7f529d..ac76f2aa4 100644 --- a/include/deque +++ b/include/deque @@ -332,19 +332,19 @@ public: } return *this; } - + _LIBCPP_INLINE_VISIBILITY __deque_iterator& operator-=(difference_type __n) { return *this += -__n; } - + _LIBCPP_INLINE_VISIBILITY __deque_iterator operator+(difference_type __n) const { __deque_iterator __t(*this); __t += __n; return __t; } - + _LIBCPP_INLINE_VISIBILITY __deque_iterator operator-(difference_type __n) const { __deque_iterator __t(*this); @@ -398,7 +398,6 @@ private: _LIBCPP_INLINE_VISIBILITY __deque_iterator(__map_iterator __m, pointer __p) : __m_iter_(__m), __ptr_(__p) {} - template friend class __deque_base; template friend class deque; template @@ -936,7 +935,7 @@ protected: __deque_base(__deque_base&& __c); __deque_base(__deque_base&& __c, const allocator_type& __a); -#endif +#endif // _LIBCPP_MOVE void swap(__deque_base& __c); void clear(); @@ -1091,7 +1090,7 @@ __deque_base<_Tp, _Allocator>::__deque_base(__deque_base&& __c, const allocator_ } } -#endif +#endif // _LIBCPP_MOVE template void @@ -1133,7 +1132,7 @@ class deque { public: // types: - + typedef _Tp value_type; typedef _Allocator allocator_type; @@ -1176,7 +1175,7 @@ public: deque(deque&& __c); deque(deque&& __c, const allocator_type& __a); deque& operator=(deque&& __c); -#endif +#endif // _LIBCPP_MOVE template void assign(_InputIter __f, _InputIter __l, @@ -1235,7 +1234,7 @@ public: void push_front(value_type&& __v); void push_back(value_type&& __v); iterator insert(const_iterator __p, value_type&& __v); -#endif +#endif // _LIBCPP_MOVE iterator insert(const_iterator __p, const value_type& __v); iterator insert(const_iterator __p, size_type __n, const value_type& __v); template @@ -1450,7 +1449,7 @@ deque<_Tp, _Allocator>::__move_assign(deque& __c, true_type) __base::__move_assign(__c); } -#endif +#endif // _LIBCPP_MOVE template template @@ -1673,7 +1672,7 @@ deque<_Tp, _Allocator>::emplace_back(_Args&&... __args) ++__base::size(); } -#endif +#endif // _LIBCPP_MOVE template void @@ -1717,7 +1716,7 @@ deque<_Tp, _Allocator>::emplace_front(_Args&&... __args) ++__base::size(); } -#endif +#endif // _LIBCPP_MOVE template typename deque<_Tp, _Allocator>::iterator @@ -1893,7 +1892,7 @@ deque<_Tp, _Allocator>::emplace(const_iterator __p, _Args&&... __args) return __base::begin() + __pos; } -#endif +#endif // _LIBCPP_MOVE template typename deque<_Tp, _Allocator>::iterator @@ -2134,7 +2133,7 @@ deque<_Tp, _Allocator>::__add_front_capacity() #ifndef _LIBCPP_NO_EXCEPTIONS try { -#endif +#endif // _LIBCPP_NO_EXCEPTIONS __buf.push_back(__alloc_traits::allocate(__a, __base::__block_size)); #ifndef _LIBCPP_NO_EXCEPTIONS } @@ -2143,7 +2142,7 @@ deque<_Tp, _Allocator>::__add_front_capacity() __alloc_traits::deallocate(__a, __buf.front(), __base::__block_size); throw; } -#endif +#endif // _LIBCPP_NO_EXCEPTIONS for (typename __base::__map_pointer __i = __base::__map_.begin(); __i != __base::__map_.end(); ++__i) __buf.push_back(*__i); @@ -2213,7 +2212,7 @@ deque<_Tp, _Allocator>::__add_front_capacity(size_type __n) #ifndef _LIBCPP_NO_EXCEPTIONS try { -#endif +#endif // _LIBCPP_NO_EXCEPTIONS for (; __nb > 0; --__nb) __buf.push_back(__alloc_traits::allocate(__a, __base::__block_size)); #ifndef _LIBCPP_NO_EXCEPTIONS @@ -2225,7 +2224,7 @@ deque<_Tp, _Allocator>::__add_front_capacity(size_type __n) __alloc_traits::deallocate(__a, *__i, __base::__block_size); throw; } -#endif +#endif // _LIBCPP_NO_EXCEPTIONS for (; __back_capacity > 0; --__back_capacity) { __buf.push_back(__base::__map_.back()); @@ -2282,7 +2281,7 @@ deque<_Tp, _Allocator>::__add_back_capacity() #ifndef _LIBCPP_NO_EXCEPTIONS try { -#endif +#endif // _LIBCPP_NO_EXCEPTIONS __buf.push_back(__alloc_traits::allocate(__a, __base::__block_size)); #ifndef _LIBCPP_NO_EXCEPTIONS } @@ -2291,7 +2290,7 @@ deque<_Tp, _Allocator>::__add_back_capacity() __alloc_traits::deallocate(__a, __buf.back(), __base::__block_size); throw; } -#endif +#endif // _LIBCPP_NO_EXCEPTIONS for (typename __base::__map_pointer __i = __base::__map_.end(); __i != __base::__map_.begin();) __buf.push_front(*--__i); @@ -2360,7 +2359,7 @@ deque<_Tp, _Allocator>::__add_back_capacity(size_type __n) #ifndef _LIBCPP_NO_EXCEPTIONS try { -#endif +#endif // _LIBCPP_NO_EXCEPTIONS for (; __nb > 0; --__nb) __buf.push_back(__alloc_traits::allocate(__a, __base::__block_size)); #ifndef _LIBCPP_NO_EXCEPTIONS @@ -2372,7 +2371,7 @@ deque<_Tp, _Allocator>::__add_back_capacity(size_type __n) __alloc_traits::deallocate(__a, *__i, __base::__block_size); throw; } -#endif +#endif // _LIBCPP_NO_EXCEPTIONS for (; __front_capacity > 0; --__front_capacity) { __buf.push_back(__base::__map_.front()); diff --git a/include/exception b/include/exception index 772ada4ea..f02b10ff1 100644 --- a/include/exception +++ b/include/exception @@ -150,7 +150,7 @@ make_exception_ptr(_E __e) { return current_exception(); } -#endif +#endif // _LIBCPP_NO_EXCEPTIONS } // nested_exception @@ -178,17 +178,17 @@ struct __nested }; template -void +void #ifdef _LIBCPP_MOVE throw_with_nested /*[[noreturn]]*/ (_Tp&& __t, typename enable_if< is_class::type>::value && !is_base_of::type>::value >::type* = 0) -#else +#else // _LIBCPP_MOVE throw_with_nested (_Tp& __t, typename enable_if< is_class<_Tp>::value && !is_base_of::value >::type* = 0) -#endif +#endif // _LIBCPP_MOVE { #ifndef _LIBCPP_NO_EXCEPTIONS throw __nested::type>(_STD::forward<_Tp>(__t)); @@ -196,17 +196,17 @@ throw_with_nested (_Tp& __t, typename enable_if< } template -void +void #ifdef _LIBCPP_MOVE throw_with_nested /*[[noreturn]]*/ (_Tp&& __t, typename enable_if< !is_class::type>::value || is_base_of::type>::value >::type* = 0) -#else +#else // _LIBCPP_MOVE throw_with_nested (_Tp& __t, typename enable_if< !is_class<_Tp>::value || is_base_of::value >::type* = 0) -#endif +#endif // _LIBCPP_MOVE { #ifndef _LIBCPP_NO_EXCEPTIONS throw _STD::forward<_Tp>(__t); diff --git a/include/ext/hash_map b/include/ext/hash_map index c337442cd..a541d374a 100644 --- a/include/ext/hash_map +++ b/include/ext/hash_map @@ -254,7 +254,7 @@ public: {return static_cast(*this)(__x, __y.first);} bool operator()(const _Tp& __x, const typename _Tp::first_type& __y) const {return static_cast(*this)(__x.first, __y);} - bool operator()(const typename _Tp::first_type& __x, + bool operator()(const typename _Tp::first_type& __x, const typename _Tp::first_type& __y) const {return static_cast(*this)(__x, __y);} }; @@ -312,7 +312,7 @@ public: { __x.__value_constructed = false; } -#else +#else // _LIBCPP_MOVE __hash_map_node_destructor(const __hash_node_destructor& __x) : __na_(__x.__na_), __first_constructed(__x.__value_constructed), @@ -320,7 +320,7 @@ public: { const_cast(__x.__value_constructed) = false; } -#endif +#endif // _LIBCPP_MOVE void operator()(pointer __p) { diff --git a/include/forward_list b/include/forward_list index dbdc8430d..9e68dfd47 100644 --- a/include/forward_list +++ b/include/forward_list @@ -214,7 +214,7 @@ public: typedef typename pointer_traits<__node_pointer>::element_type::value_type value_type; typedef value_type& reference; - typedef typename pointer_traits<__node_pointer>::difference_type + typedef typename pointer_traits<__node_pointer>::difference_type difference_type; typedef typename pointer_traits<__node_pointer>::template #ifndef _LIBCPP_HAS_NO_TEMPLATE_ALIASES @@ -277,7 +277,7 @@ public: typedef forward_iterator_tag iterator_category; typedef typename __node::value_type value_type; typedef const value_type& reference; - typedef typename pointer_traits<__node_const_pointer>::difference_type + typedef typename pointer_traits<__node_const_pointer>::difference_type difference_type; typedef typename pointer_traits<__node_const_pointer>::template #ifndef _LIBCPP_HAS_NO_TEMPLATE_ALIASES @@ -358,7 +358,7 @@ protected: #ifdef _LIBCPP_MOVE __forward_list_base(__forward_list_base&& __x); __forward_list_base(__forward_list_base&& __x, const allocator_type& __a); -#endif +#endif // _LIBCPP_MOVE private: __forward_list_base(const __forward_list_base&); @@ -428,7 +428,7 @@ __forward_list_base<_Tp, _Alloc>::__forward_list_base(__forward_list_base&& __x, } } -#endif +#endif // _LIBCPP_MOVE template __forward_list_base<_Tp, _Alloc>::~__forward_list_base() @@ -501,7 +501,7 @@ public: #ifdef _LIBCPP_MOVE forward_list(forward_list&& __x) : base(_STD::move(__x)) {} forward_list(forward_list&& __x, const allocator_type& __a); -#endif +#endif // _LIBCPP_MOVE forward_list(initializer_list __il); forward_list(initializer_list __il, const allocator_type& __a); @@ -546,7 +546,7 @@ public: #ifdef _LIBCPP_MOVE template void emplace_front(_Args&&... __args); void push_front(value_type&& __v); -#endif +#endif // _LIBCPP_MOVE void push_front(const value_type& __v); void pop_front(); @@ -555,7 +555,7 @@ public: template iterator emplace_after(const_iterator __p, _Args&&... __args); iterator insert_after(const_iterator __p, value_type&& __v); -#endif +#endif // _LIBCPP_MOVE iterator insert_after(const_iterator __p, const value_type& __v); iterator insert_after(const_iterator __p, size_type __n, const value_type& __v); template @@ -582,12 +582,12 @@ public: void splice_after(const_iterator __p, forward_list&& __x, const_iterator __i); void splice_after(const_iterator __p, forward_list&& __x, const_iterator __f, const_iterator __l); -#else +#else // _LIBCPP_MOVE void splice_after(const_iterator __p, forward_list& __x); void splice_after(const_iterator __p, forward_list& __x, const_iterator __i); void splice_after(const_iterator __p, forward_list& __x, const_iterator __f, const_iterator __l); -#endif +#endif // _LIBCPP_MOVE void remove(const value_type& __v); template void remove_if(_Predicate __pred); void unique() {unique(__equal_to());} @@ -595,10 +595,10 @@ public: #ifdef _LIBCPP_MOVE void merge(forward_list&& __x) {merge(_STD::move(__x), __less());} template void merge(forward_list&& __x, _Compare __comp); -#else +#else // _LIBCPP_MOVE void merge(forward_list& __x) {merge(__x, __less());} template void merge(forward_list& __x, _Compare __comp); -#endif +#endif // _LIBCPP_MOVE void sort() {sort(__less());} template void sort(_Compare __comp); void reverse(); @@ -612,7 +612,7 @@ private: #ifdef _LIBCPP_MOVE void __move_assign(forward_list& __x, true_type); void __move_assign(forward_list& __x, false_type); -#endif +#endif // _LIBCPP_MOVE template static @@ -719,7 +719,7 @@ forward_list<_Tp, _Alloc>::forward_list(forward_list&& __x, } } -#endif +#endif // _LIBCPP_MOVE template forward_list<_Tp, _Alloc>::forward_list(initializer_list __il) @@ -782,7 +782,7 @@ forward_list<_Tp, _Alloc>::operator=(forward_list&& __x) return *this; } -#endif +#endif // _LIBCPP_MOVE template inline @@ -864,7 +864,7 @@ forward_list<_Tp, _Alloc>::push_front(value_type&& __v) base::__before_begin()->__next_ = __h.release(); } -#endif +#endif // _LIBCPP_MOVE template void @@ -921,7 +921,7 @@ forward_list<_Tp, _Alloc>::insert_after(const_iterator __p, value_type&& __v) return iterator(__r->__next_); } -#endif +#endif // _LIBCPP_MOVE template typename forward_list<_Tp, _Alloc>::iterator @@ -954,7 +954,7 @@ forward_list<_Tp, _Alloc>::insert_after(const_iterator __p, size_type __n, #ifndef _LIBCPP_NO_EXCEPTIONS try { -#endif +#endif // _LIBCPP_NO_EXCEPTIONS for (--__n; __n != 0; --__n, __last = __last->__next_) { __h.reset(__node_traits::allocate(__a, 1)); @@ -974,7 +974,7 @@ forward_list<_Tp, _Alloc>::insert_after(const_iterator __p, size_type __n, } throw; } -#endif +#endif // _LIBCPP_NO_EXCEPTIONS __last->__next_ = __r->__next_; __r->__next_ = __first; __r = __last; @@ -1004,7 +1004,7 @@ forward_list<_Tp, _Alloc>::insert_after(const_iterator __p, #ifndef _LIBCPP_NO_EXCEPTIONS try { -#endif +#endif // _LIBCPP_NO_EXCEPTIONS for (++__f; __f != __l; ++__f, __last = __last->__next_) { __h.reset(__node_traits::allocate(__a, 1)); @@ -1024,7 +1024,7 @@ forward_list<_Tp, _Alloc>::insert_after(const_iterator __p, } throw; } -#endif +#endif // _LIBCPP_NO_EXCEPTIONS __last->__next_ = __r->__next_; __r->__next_ = __first; __r = __last; diff --git a/include/fstream b/include/fstream index 1d7d221a8..0eae705b9 100644 --- a/include/fstream +++ b/include/fstream @@ -122,7 +122,7 @@ public: void close(); }; -template +template void swap(basic_ofstream& x, basic_ofstream& y); @@ -333,7 +333,7 @@ basic_filebuf<_CharT, _Traits>::operator=(basic_filebuf&& __rhs) swap(__rhs); } -#endif +#endif // _LIBCPP_MOVE template basic_filebuf<_CharT, _Traits>::~basic_filebuf() @@ -341,14 +341,14 @@ basic_filebuf<_CharT, _Traits>::~basic_filebuf() #ifndef _LIBCPP_NO_EXCEPTIONS try { -#endif +#endif // _LIBCPP_NO_EXCEPTIONS close(); #ifndef _LIBCPP_NO_EXCEPTIONS } catch (...) { } -#endif +#endif // _LIBCPP_NO_EXCEPTIONS if (__owns_eb_) delete [] __extbuf_; if (__owns_ib_) @@ -1035,7 +1035,7 @@ basic_ifstream<_CharT, _Traits>::operator=(basic_ifstream&& __rhs) return *this; } -#endif +#endif // _LIBCPP_MOVE template inline _LIBCPP_INLINE_VISIBILITY @@ -1180,7 +1180,7 @@ basic_ofstream<_CharT, _Traits>::operator=(basic_ofstream&& __rhs) return *this; } -#endif +#endif // _LIBCPP_MOVE template inline _LIBCPP_INLINE_VISIBILITY @@ -1325,7 +1325,7 @@ basic_fstream<_CharT, _Traits>::operator=(basic_fstream&& __rhs) return *this; } -#endif +#endif // _LIBCPP_MOVE template inline _LIBCPP_INLINE_VISIBILITY diff --git a/include/functional b/include/functional index 30063f408..b9378aa2f 100644 --- a/include/functional +++ b/include/functional @@ -186,18 +186,18 @@ template binary_negate not2(const Predicate& pred); template struct is_bind_expression; template struct is_placeholder; -template +template unspecified bind(Fn&&, BoundArgs&&...); -template +template unspecified bind(Fn&&, BoundArgs&&...); -namespace placeholders { - // M is the implementation-defined number of placeholders +namespace placeholders { + // M is the implementation-defined number of placeholders extern unspecified _1; extern unspecified _2; - . - . - . + . + . + . extern unspecified _M; } @@ -415,21 +415,21 @@ public: template const T* target() const; }; -// Null pointer comparisons: -template +// Null pointer comparisons: +template bool operator==(const function&, nullptr_t); -template +template bool operator==(nullptr_t, const function&); -template +template bool operator!=(const function&, nullptr_t); -template +template bool operator!=(nullptr_t, const function&); -// specialized algorithms: -template +// specialized algorithms: +template void swap(function&, function&); template struct hash; @@ -861,7 +861,6 @@ const_mem_fun1_ref_t<_Sp,_Tp,_Ap> mem_fun_ref(_Sp (_Tp::*__f)(_Ap) const) {return const_mem_fun1_ref_t<_Sp,_Tp,_Ap>(__f);} - #ifdef _LIBCPP_HAS_NO_VARIADICS #include <__functional_03> @@ -982,7 +981,7 @@ public: #ifndef _LIBCPP_NO_RTTI virtual const void* target(const type_info&) const = 0; virtual const std::type_info& target_type() const = 0; -#endif +#endif // _LIBCPP_NO_RTTI }; template class __func; @@ -1003,7 +1002,7 @@ public: #ifndef _LIBCPP_NO_RTTI virtual const void* target(const type_info&) const; virtual const std::type_info& target_type() const; -#endif +#endif // _LIBCPP_NO_RTTI }; template @@ -1067,7 +1066,7 @@ __func<_F, _Alloc, _R(_ArgTypes...)>::target_type() const return typeid(_F); } -#endif +#endif // _LIBCPP_NO_RTTI } // __function @@ -1154,7 +1153,7 @@ public: const std::type_info& target_type() const; template _T* target(); template const _T* target() const; -#endif +#endif // _LIBCPP_NO_RTTI }; template @@ -1390,7 +1389,7 @@ function<_R(_ArgTypes...)>::operator()(_ArgTypes... __arg) const #ifndef _LIBCPP_NO_EXCEPTIONS if (__f_ == 0) throw bad_function_call(); -#endif +#endif // _LIBCPP_NO_EXCEPTIONS return (*__f_)(_STD::forward<_ArgTypes>(__arg)...); } @@ -1425,29 +1424,29 @@ function<_R(_ArgTypes...)>::target() const return (const _T*)__f_->target(typeid(_T)); } -#endif +#endif // _LIBCPP_NO_RTTI -template +template inline _LIBCPP_INLINE_VISIBILITY bool operator==(const function<_R(_ArgTypes...)>& __f, nullptr_t) {return !__f;} -template +template inline _LIBCPP_INLINE_VISIBILITY bool operator==(nullptr_t, const function<_R(_ArgTypes...)>& __f) {return !__f;} -template +template inline _LIBCPP_INLINE_VISIBILITY bool operator!=(const function<_R(_ArgTypes...)>& __f, nullptr_t) {return (bool)__f;} -template +template inline _LIBCPP_INLINE_VISIBILITY bool operator!=(nullptr_t, const function<_R(_ArgTypes...)>& __f) {return (bool)__f;} -template +template inline _LIBCPP_INLINE_VISIBILITY void swap(function<_R(_ArgTypes...)>& __x, function<_R(_ArgTypes...)>& __y) @@ -1500,7 +1499,6 @@ struct __mu_return1 typedef typename result_of<_Ti(_Uj...)>::type type; }; - template inline _LIBCPP_INLINE_VISIBILITY typename __mu_return1::type @@ -1638,7 +1636,7 @@ __apply_functor(_F& __f, _BoundArgs& __bound_args, __tuple_indices<_Indx...>, return __invoke(__f, __mu(get<_Indx>(__bound_args), __args)...); } -template +template class __bind : public __weak_result_type<_F> { @@ -1661,7 +1659,7 @@ public: operator()(_Args&& ...__args) { // compiler bug workaround - return __apply_functor(__f_, __bound_args_, __indices(), + return __apply_functor(__f_, __bound_args_, __indices(), tuple<_Args&&...>(__args...)); } @@ -1669,15 +1667,15 @@ public: typename __bind_return<_F, tuple<_BoundArgs...>, tuple<_Args&&...> >::type operator()(_Args&& ...__args) const { - return __apply_functor(__f_, __bound_args_, __indices(), + return __apply_functor(__f_, __bound_args_, __indices(), tuple<_Args&&...>(__args...)); } }; -template +template struct __is_bind_expression<__bind<_F, _BoundArgs...> > : public true_type {}; -template +template class __bind_r : public __bind<_F, _BoundArgs...> { @@ -1705,10 +1703,10 @@ public: } }; -template +template struct __is_bind_expression<__bind_r<_R, _F, _BoundArgs...> > : public true_type {}; -template +template inline _LIBCPP_INLINE_VISIBILITY __bind::type, typename decay<_BoundArgs>::type...> bind(_F&& __f, _BoundArgs&&... __bound_args) @@ -1717,7 +1715,7 @@ bind(_F&& __f, _BoundArgs&&... __bound_args) return type(_STD::forward<_F>(__f), _STD::forward<_BoundArgs>(__bound_args)...); } -template +template inline _LIBCPP_INLINE_VISIBILITY __bind_r<_R, typename decay<_F>::type, typename decay<_BoundArgs>::type...> bind(_F&& __f, _BoundArgs&&... __bound_args) @@ -1772,7 +1770,7 @@ struct hash size_t operator()(char32_t __v) const {return static_cast(__v);} }; -#endif +#endif // _LIBCPP_HAS_NO_UNICODE_CHARS template <> struct hash diff --git a/include/iomanip b/include/iomanip index 4a677ef89..3efce132e 100644 --- a/include/iomanip +++ b/include/iomanip @@ -270,7 +270,7 @@ operator>>(basic_istream<_CharT, _Traits>& __is, const __iom_t7<_MoneyT>& __x) #ifndef _LIBCPP_NO_EXCEPTIONS try { -#endif +#endif // _LIBCPP_NO_EXCEPTIONS typename basic_istream<_CharT, _Traits>::sentry __s(__is); if (__s) { @@ -287,7 +287,7 @@ operator>>(basic_istream<_CharT, _Traits>& __is, const __iom_t7<_MoneyT>& __x) { __is.__set_badbit_and_consider_rethrow(); } -#endif +#endif // _LIBCPP_NO_EXCEPTIONS return __is; } @@ -329,7 +329,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, const __iom_t8<_MoneyT>& __x) #ifndef _LIBCPP_NO_EXCEPTIONS try { -#endif +#endif // _LIBCPP_NO_EXCEPTIONS typename basic_ostream<_CharT, _Traits>::sentry __s(__os); if (__s) { @@ -345,7 +345,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, const __iom_t8<_MoneyT>& __x) { __os.__set_badbit_and_consider_rethrow(); } -#endif +#endif // _LIBCPP_NO_EXCEPTIONS return __os; } @@ -387,7 +387,7 @@ operator>>(basic_istream<_CharT, _Traits>& __is, const __iom_t9<_CharT>& __x) #ifndef _LIBCPP_NO_EXCEPTIONS try { -#endif +#endif // _LIBCPP_NO_EXCEPTIONS typename basic_istream<_CharT, _Traits>::sentry __s(__is); if (__s) { @@ -405,7 +405,7 @@ operator>>(basic_istream<_CharT, _Traits>& __is, const __iom_t9<_CharT>& __x) { __is.__set_badbit_and_consider_rethrow(); } -#endif +#endif // _LIBCPP_NO_EXCEPTIONS return __is; } @@ -447,7 +447,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, const __iom_t10<_CharT>& __x) #ifndef _LIBCPP_NO_EXCEPTIONS try { -#endif +#endif // _LIBCPP_NO_EXCEPTIONS typename basic_ostream<_CharT, _Traits>::sentry __s(__os); if (__s) { @@ -464,7 +464,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, const __iom_t10<_CharT>& __x) { __os.__set_badbit_and_consider_rethrow(); } -#endif +#endif // _LIBCPP_NO_EXCEPTIONS return __os; } diff --git a/include/ios b/include/ios index 47c20cba3..d0016befc 100644 --- a/include/ios +++ b/include/ios @@ -310,13 +310,13 @@ public: iostate rdstate() const; void clear(iostate __state = goodbit); void setstate(iostate __state); - - bool good() const; - bool eof() const; - bool fail() const; - bool bad() const; - iostate exceptions() const; + bool good() const; + bool eof() const; + bool fail() const; + bool bad() const; + + iostate exceptions() const; void exceptions(iostate __except); void __set_badbit_and_consider_rethrow(); @@ -402,10 +402,10 @@ make_error_condition(io_errc __e) class ios_base::failure : public system_error -{ -public: +{ +public: explicit failure(const string& __msg, const error_code& __ec = io_errc::stream); - explicit failure(const char* __msg, const error_code& __ec = io_errc::stream); + explicit failure(const char* __msg, const error_code& __ec = io_errc::stream); virtual ~failure() throw(); }; diff --git a/include/iosfwd b/include/iosfwd index 32f679e7b..a4d3f38b5 100644 --- a/include/iosfwd +++ b/include/iosfwd @@ -158,7 +158,7 @@ typedef fpos wstreampos; #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS typedef fpos u16streampos; typedef fpos u32streampos; -#endif +#endif // _LIBCPP_HAS_NO_UNICODE_CHARS typedef long long streamoff; // for char_traits in diff --git a/include/istream b/include/istream index 4b4195481..e79d6ebd5 100644 --- a/include/istream +++ b/include/istream @@ -307,7 +307,7 @@ basic_istream<_CharT, _Traits>::operator=(basic_istream&& __rhs) return *this; } -#endif +#endif // _LIBCPP_MOVE template basic_istream<_CharT, _Traits>::~basic_istream() @@ -330,7 +330,7 @@ basic_istream<_CharT, _Traits>::operator>>(unsigned short& __n) #ifndef _LIBCPP_NO_EXCEPTIONS try { -#endif +#endif // _LIBCPP_NO_EXCEPTIONS sentry __s(*this); if (__s) { @@ -346,7 +346,7 @@ basic_istream<_CharT, _Traits>::operator>>(unsigned short& __n) { this->__set_badbit_and_consider_rethrow(); } -#endif +#endif // _LIBCPP_NO_EXCEPTIONS return *this; } @@ -357,7 +357,7 @@ basic_istream<_CharT, _Traits>::operator>>(unsigned int& __n) #ifndef _LIBCPP_NO_EXCEPTIONS try { -#endif +#endif // _LIBCPP_NO_EXCEPTIONS sentry __s(*this); if (__s) { @@ -373,7 +373,7 @@ basic_istream<_CharT, _Traits>::operator>>(unsigned int& __n) { this->__set_badbit_and_consider_rethrow(); } -#endif +#endif // _LIBCPP_NO_EXCEPTIONS return *this; } @@ -384,7 +384,7 @@ basic_istream<_CharT, _Traits>::operator>>(long& __n) #ifndef _LIBCPP_NO_EXCEPTIONS try { -#endif +#endif // _LIBCPP_NO_EXCEPTIONS sentry __s(*this); if (__s) { @@ -400,7 +400,7 @@ basic_istream<_CharT, _Traits>::operator>>(long& __n) { this->__set_badbit_and_consider_rethrow(); } -#endif +#endif // _LIBCPP_NO_EXCEPTIONS return *this; } @@ -411,7 +411,7 @@ basic_istream<_CharT, _Traits>::operator>>(unsigned long& __n) #ifndef _LIBCPP_NO_EXCEPTIONS try { -#endif +#endif // _LIBCPP_NO_EXCEPTIONS sentry __s(*this); if (__s) { @@ -427,7 +427,7 @@ basic_istream<_CharT, _Traits>::operator>>(unsigned long& __n) { this->__set_badbit_and_consider_rethrow(); } -#endif +#endif // _LIBCPP_NO_EXCEPTIONS return *this; } @@ -438,7 +438,7 @@ basic_istream<_CharT, _Traits>::operator>>(long long& __n) #ifndef _LIBCPP_NO_EXCEPTIONS try { -#endif +#endif // _LIBCPP_NO_EXCEPTIONS sentry __s(*this); if (__s) { @@ -454,7 +454,7 @@ basic_istream<_CharT, _Traits>::operator>>(long long& __n) { this->__set_badbit_and_consider_rethrow(); } -#endif +#endif // _LIBCPP_NO_EXCEPTIONS return *this; } @@ -465,7 +465,7 @@ basic_istream<_CharT, _Traits>::operator>>(unsigned long long& __n) #ifndef _LIBCPP_NO_EXCEPTIONS try { -#endif +#endif // _LIBCPP_NO_EXCEPTIONS sentry __s(*this); if (__s) { @@ -481,7 +481,7 @@ basic_istream<_CharT, _Traits>::operator>>(unsigned long long& __n) { this->__set_badbit_and_consider_rethrow(); } -#endif +#endif // _LIBCPP_NO_EXCEPTIONS return *this; } @@ -492,7 +492,7 @@ basic_istream<_CharT, _Traits>::operator>>(float& __n) #ifndef _LIBCPP_NO_EXCEPTIONS try { -#endif +#endif // _LIBCPP_NO_EXCEPTIONS sentry __s(*this); if (__s) { @@ -508,7 +508,7 @@ basic_istream<_CharT, _Traits>::operator>>(float& __n) { this->__set_badbit_and_consider_rethrow(); } -#endif +#endif // _LIBCPP_NO_EXCEPTIONS return *this; } @@ -519,7 +519,7 @@ basic_istream<_CharT, _Traits>::operator>>(double& __n) #ifndef _LIBCPP_NO_EXCEPTIONS try { -#endif +#endif // _LIBCPP_NO_EXCEPTIONS sentry __s(*this); if (__s) { @@ -535,7 +535,7 @@ basic_istream<_CharT, _Traits>::operator>>(double& __n) { this->__set_badbit_and_consider_rethrow(); } -#endif +#endif // _LIBCPP_NO_EXCEPTIONS return *this; } @@ -546,7 +546,7 @@ basic_istream<_CharT, _Traits>::operator>>(long double& __n) #ifndef _LIBCPP_NO_EXCEPTIONS try { -#endif +#endif // _LIBCPP_NO_EXCEPTIONS sentry __s(*this); if (__s) { @@ -562,7 +562,7 @@ basic_istream<_CharT, _Traits>::operator>>(long double& __n) { this->__set_badbit_and_consider_rethrow(); } -#endif +#endif // _LIBCPP_NO_EXCEPTIONS return *this; } @@ -573,7 +573,7 @@ basic_istream<_CharT, _Traits>::operator>>(bool& __n) #ifndef _LIBCPP_NO_EXCEPTIONS try { -#endif +#endif // _LIBCPP_NO_EXCEPTIONS sentry __s(*this); if (__s) { @@ -589,7 +589,7 @@ basic_istream<_CharT, _Traits>::operator>>(bool& __n) { this->__set_badbit_and_consider_rethrow(); } -#endif +#endif // _LIBCPP_NO_EXCEPTIONS return *this; } @@ -600,7 +600,7 @@ basic_istream<_CharT, _Traits>::operator>>(void*& __n) #ifndef _LIBCPP_NO_EXCEPTIONS try { -#endif +#endif // _LIBCPP_NO_EXCEPTIONS sentry __s(*this); if (__s) { @@ -616,7 +616,7 @@ basic_istream<_CharT, _Traits>::operator>>(void*& __n) { this->__set_badbit_and_consider_rethrow(); } -#endif +#endif // _LIBCPP_NO_EXCEPTIONS return *this; } @@ -627,7 +627,7 @@ basic_istream<_CharT, _Traits>::operator>>(short& __n) #ifndef _LIBCPP_NO_EXCEPTIONS try { -#endif +#endif // _LIBCPP_NO_EXCEPTIONS sentry __s(*this); if (__s) { @@ -656,7 +656,7 @@ basic_istream<_CharT, _Traits>::operator>>(short& __n) { this->__set_badbit_and_consider_rethrow(); } -#endif +#endif // _LIBCPP_NO_EXCEPTIONS return *this; } @@ -667,7 +667,7 @@ basic_istream<_CharT, _Traits>::operator>>(int& __n) #ifndef _LIBCPP_NO_EXCEPTIONS try { -#endif +#endif // _LIBCPP_NO_EXCEPTIONS sentry __s(*this); if (__s) { @@ -696,7 +696,7 @@ basic_istream<_CharT, _Traits>::operator>>(int& __n) { this->__set_badbit_and_consider_rethrow(); } -#endif +#endif // _LIBCPP_NO_EXCEPTIONS return *this; } @@ -734,7 +734,7 @@ operator>>(basic_istream<_CharT, _Traits>& __is, _CharT* __s) #ifndef _LIBCPP_NO_EXCEPTIONS try { -#endif +#endif // _LIBCPP_NO_EXCEPTIONS typename basic_istream<_CharT, _Traits>::sentry __sen(__is); if (__sen) { @@ -768,7 +768,7 @@ operator>>(basic_istream<_CharT, _Traits>& __is, _CharT* __s) { __is.__set_badbit_and_consider_rethrow(); } -#endif +#endif // _LIBCPP_NO_EXCEPTIONS return __is; } @@ -795,7 +795,7 @@ operator>>(basic_istream<_CharT, _Traits>& __is, _CharT& __c) #ifndef _LIBCPP_NO_EXCEPTIONS try { -#endif +#endif // _LIBCPP_NO_EXCEPTIONS typename basic_istream<_CharT, _Traits>::sentry __sen(__is); if (__sen) { @@ -817,7 +817,7 @@ operator>>(basic_istream<_CharT, _Traits>& __is, _CharT& __c) { __is.__set_badbit_and_consider_rethrow(); } -#endif +#endif // _LIBCPP_NO_EXCEPTIONS return __is; } @@ -845,7 +845,7 @@ basic_istream<_CharT, _Traits>::operator>>(basic_streambuf::operator>>(basic_streambuf _I; typedef ostreambuf_iterator _O; _I __i(*this); @@ -880,7 +880,7 @@ basic_istream<_CharT, _Traits>::operator>>(basic_streambuf__set_failbit_and_consider_rethrow(); } -#endif +#endif // _LIBCPP_NO_EXCEPTIONS } else this->setstate(ios_base::failbit); @@ -892,7 +892,7 @@ basic_istream<_CharT, _Traits>::operator>>(basic_streambuf__set_badbit_and_consider_rethrow(); } -#endif +#endif // _LIBCPP_NO_EXCEPTIONS return *this; } @@ -905,7 +905,7 @@ basic_istream<_CharT, _Traits>::get() #ifndef _LIBCPP_NO_EXCEPTIONS try { -#endif +#endif // _LIBCPP_NO_EXCEPTIONS sentry __s(*this, true); if (__s) { @@ -932,7 +932,7 @@ basic_istream<_CharT, _Traits>::get() { this->__set_badbit_and_consider_rethrow(); } -#endif +#endif // _LIBCPP_NO_EXCEPTIONS return __r; } @@ -955,7 +955,7 @@ basic_istream<_CharT, _Traits>::get(char_type* __s, streamsize __n, char_type __ #ifndef _LIBCPP_NO_EXCEPTIONS try { -#endif +#endif // _LIBCPP_NO_EXCEPTIONS sentry __sen(*this, true); if (__sen) { @@ -990,7 +990,7 @@ basic_istream<_CharT, _Traits>::get(char_type* __s, streamsize __n, char_type __ { this->__set_badbit_and_consider_rethrow(); } -#endif +#endif // _LIBCPP_NO_EXCEPTIONS return *this; } @@ -1011,7 +1011,7 @@ basic_istream<_CharT, _Traits>::get(basic_streambuf& __s #ifndef _LIBCPP_NO_EXCEPTIONS try { -#endif +#endif // _LIBCPP_NO_EXCEPTIONS sentry __sen(*this, true); if (__sen) { @@ -1020,7 +1020,7 @@ basic_istream<_CharT, _Traits>::get(basic_streambuf& __s #ifndef _LIBCPP_NO_EXCEPTIONS try { -#endif +#endif // _LIBCPP_NO_EXCEPTIONS typedef istreambuf_iterator _I; typedef ostreambuf_iterator _O; _I __i(*this); @@ -1042,7 +1042,7 @@ basic_istream<_CharT, _Traits>::get(basic_streambuf& __s catch (...) { } -#endif +#endif // _LIBCPP_NO_EXCEPTIONS if (__c == 0) __err |= ios_base::failbit; this->setstate(__err); @@ -1054,7 +1054,7 @@ basic_istream<_CharT, _Traits>::get(basic_streambuf& __s { this->__set_badbit_and_consider_rethrow(); } -#endif +#endif // _LIBCPP_NO_EXCEPTIONS return *this; } @@ -1074,7 +1074,7 @@ basic_istream<_CharT, _Traits>::getline(char_type* __s, streamsize __n, char_typ #ifndef _LIBCPP_NO_EXCEPTIONS try { -#endif +#endif // _LIBCPP_NO_EXCEPTIONS sentry __sen(*this, true); if (__sen) { @@ -1112,7 +1112,7 @@ basic_istream<_CharT, _Traits>::getline(char_type* __s, streamsize __n, char_typ { this->__set_badbit_and_consider_rethrow(); } -#endif +#endif // _LIBCPP_NO_EXCEPTIONS return *this; } @@ -1132,7 +1132,7 @@ basic_istream<_CharT, _Traits>::ignore(streamsize __n, int_type __dlm) #ifndef _LIBCPP_NO_EXCEPTIONS try { -#endif +#endif // _LIBCPP_NO_EXCEPTIONS sentry __sen(*this, true); if (__sen) { @@ -1172,7 +1172,7 @@ basic_istream<_CharT, _Traits>::ignore(streamsize __n, int_type __dlm) { this->__set_badbit_and_consider_rethrow(); } -#endif +#endif // _LIBCPP_NO_EXCEPTIONS return *this; } @@ -1185,7 +1185,7 @@ basic_istream<_CharT, _Traits>::peek() #ifndef _LIBCPP_NO_EXCEPTIONS try { -#endif +#endif // _LIBCPP_NO_EXCEPTIONS sentry __sen(*this, true); if (__sen) __r = this->rdbuf()->sgetc(); @@ -1195,7 +1195,7 @@ basic_istream<_CharT, _Traits>::peek() { this->__set_badbit_and_consider_rethrow(); } -#endif +#endif // _LIBCPP_NO_EXCEPTIONS return __r; } @@ -1207,7 +1207,7 @@ basic_istream<_CharT, _Traits>::read(char_type* __s, streamsize __n) #ifndef _LIBCPP_NO_EXCEPTIONS try { -#endif +#endif // _LIBCPP_NO_EXCEPTIONS sentry __sen(*this, true); if (__sen) { @@ -1234,7 +1234,7 @@ basic_istream<_CharT, _Traits>::read(char_type* __s, streamsize __n) { this->__set_badbit_and_consider_rethrow(); } -#endif +#endif // _LIBCPP_NO_EXCEPTIONS return *this; } @@ -1247,7 +1247,7 @@ basic_istream<_CharT, _Traits>::readsome(char_type* __s, streamsize __n) #ifndef _LIBCPP_NO_EXCEPTIONS try { -#endif +#endif // _LIBCPP_NO_EXCEPTIONS sentry __sen(*this, true); if (__sen) { @@ -1279,7 +1279,7 @@ basic_istream<_CharT, _Traits>::readsome(char_type* __s, streamsize __n) { this->__set_badbit_and_consider_rethrow(); } -#endif +#endif // _LIBCPP_NO_EXCEPTIONS return __c; } @@ -1291,7 +1291,7 @@ basic_istream<_CharT, _Traits>::putback(char_type __c) #ifndef _LIBCPP_NO_EXCEPTIONS try { -#endif +#endif // _LIBCPP_NO_EXCEPTIONS sentry __sen(*this, true); if (__sen) { @@ -1306,7 +1306,7 @@ basic_istream<_CharT, _Traits>::putback(char_type __c) { this->__set_badbit_and_consider_rethrow(); } -#endif +#endif // _LIBCPP_NO_EXCEPTIONS return *this; } @@ -1318,7 +1318,7 @@ basic_istream<_CharT, _Traits>::unget() #ifndef _LIBCPP_NO_EXCEPTIONS try { -#endif +#endif // _LIBCPP_NO_EXCEPTIONS sentry __sen(*this, true); if (__sen) { @@ -1333,7 +1333,7 @@ basic_istream<_CharT, _Traits>::unget() { this->__set_badbit_and_consider_rethrow(); } -#endif +#endif // _LIBCPP_NO_EXCEPTIONS return *this; } @@ -1345,7 +1345,7 @@ basic_istream<_CharT, _Traits>::sync() #ifndef _LIBCPP_NO_EXCEPTIONS try { -#endif +#endif // _LIBCPP_NO_EXCEPTIONS sentry __sen(*this, true); if (__sen) { @@ -1363,7 +1363,7 @@ basic_istream<_CharT, _Traits>::sync() { this->__set_badbit_and_consider_rethrow(); } -#endif +#endif // _LIBCPP_NO_EXCEPTIONS return __r; } @@ -1375,7 +1375,7 @@ basic_istream<_CharT, _Traits>::tellg() #ifndef _LIBCPP_NO_EXCEPTIONS try { -#endif +#endif // _LIBCPP_NO_EXCEPTIONS sentry __sen(*this, true); if (__sen) __r = this->rdbuf()->pubseekoff(0, ios_base::cur, ios_base::in); @@ -1385,7 +1385,7 @@ basic_istream<_CharT, _Traits>::tellg() { this->__set_badbit_and_consider_rethrow(); } -#endif +#endif // _LIBCPP_NO_EXCEPTIONS return __r; } @@ -1396,7 +1396,7 @@ basic_istream<_CharT, _Traits>::seekg(pos_type __pos) #ifndef _LIBCPP_NO_EXCEPTIONS try { -#endif +#endif // _LIBCPP_NO_EXCEPTIONS sentry __sen(*this, true); if (__sen) if (this->rdbuf()->pubseekpos(__pos, ios_base::in) == pos_type(-1)) @@ -1407,7 +1407,7 @@ basic_istream<_CharT, _Traits>::seekg(pos_type __pos) { this->__set_badbit_and_consider_rethrow(); } -#endif +#endif // _LIBCPP_NO_EXCEPTIONS return *this; } @@ -1418,7 +1418,7 @@ basic_istream<_CharT, _Traits>::seekg(off_type __off, ios_base::seekdir __dir) #ifndef _LIBCPP_NO_EXCEPTIONS try { -#endif +#endif // _LIBCPP_NO_EXCEPTIONS sentry __sen(*this, true); if (__sen) this->rdbuf()->pubseekoff(__off, __dir, ios_base::in); @@ -1428,7 +1428,7 @@ basic_istream<_CharT, _Traits>::seekg(off_type __off, ios_base::seekdir __dir) { this->__set_badbit_and_consider_rethrow(); } -#endif +#endif // _LIBCPP_NO_EXCEPTIONS return *this; } @@ -1439,7 +1439,7 @@ ws(basic_istream<_CharT, _Traits>& __is) #ifndef _LIBCPP_NO_EXCEPTIONS try { -#endif +#endif // _LIBCPP_NO_EXCEPTIONS typename basic_istream<_CharT, _Traits>::sentry __sen(__is, true); if (__sen) { @@ -1459,7 +1459,7 @@ ws(basic_istream<_CharT, _Traits>& __is) { __is.__set_badbit_and_consider_rethrow(); } -#endif +#endif // _LIBCPP_NO_EXCEPTIONS return __is; } @@ -1474,7 +1474,7 @@ operator>>(basic_istream<_CharT, _Traits>&& __is, _Tp& __x) return __is; } -#endif +#endif // _LIBCPP_MOVE template class basic_iostream @@ -1530,7 +1530,7 @@ basic_iostream<_CharT, _Traits>::operator=(basic_iostream&& __rhs) return *this; } -#endif +#endif // _LIBCPP_MOVE template basic_iostream<_CharT, _Traits>::~basic_iostream() @@ -1553,7 +1553,7 @@ operator>>(basic_istream<_CharT, _Traits>& __is, #ifndef _LIBCPP_NO_EXCEPTIONS try { -#endif +#endif // _LIBCPP_NO_EXCEPTIONS typename basic_istream<_CharT, _Traits>::sentry __sen(__is); if (__sen) { @@ -1591,19 +1591,19 @@ operator>>(basic_istream<_CharT, _Traits>& __is, { __is.__set_badbit_and_consider_rethrow(); } -#endif +#endif // _LIBCPP_NO_EXCEPTIONS return __is; } template -basic_istream<_CharT, _Traits>& +basic_istream<_CharT, _Traits>& getline(basic_istream<_CharT, _Traits>& __is, basic_string<_CharT, _Traits, _Allocator>& __str, _CharT __dlm) { #ifndef _LIBCPP_NO_EXCEPTIONS try { -#endif +#endif // _LIBCPP_NO_EXCEPTIONS typename basic_istream<_CharT, _Traits>::sentry __sen(__is, true); if (__sen) { @@ -1642,13 +1642,13 @@ getline(basic_istream<_CharT, _Traits>& __is, { __is.__set_badbit_and_consider_rethrow(); } -#endif +#endif // _LIBCPP_NO_EXCEPTIONS return __is; } template inline -basic_istream<_CharT, _Traits>& +basic_istream<_CharT, _Traits>& getline(basic_istream<_CharT, _Traits>& __is, basic_string<_CharT, _Traits, _Allocator>& __str) { @@ -1659,7 +1659,7 @@ getline(basic_istream<_CharT, _Traits>& __is, template inline -basic_istream<_CharT, _Traits>& +basic_istream<_CharT, _Traits>& getline(basic_istream<_CharT, _Traits>&& __is, basic_string<_CharT, _Traits, _Allocator>& __str, _CharT __dlm) { @@ -1668,14 +1668,14 @@ getline(basic_istream<_CharT, _Traits>&& __is, template inline -basic_istream<_CharT, _Traits>& +basic_istream<_CharT, _Traits>& getline(basic_istream<_CharT, _Traits>&& __is, basic_string<_CharT, _Traits, _Allocator>& __str) { return getline(__is, __str, __is.widen('\n')); } -#endif +#endif // _LIBCPP_MOVE template basic_istream<_CharT, _Traits>& @@ -1684,7 +1684,7 @@ operator>>(basic_istream<_CharT, _Traits>& __is, bitset<_Size>& __x) #ifndef _LIBCPP_NO_EXCEPTIONS try { -#endif +#endif // _LIBCPP_NO_EXCEPTIONS typename basic_istream<_CharT, _Traits>::sentry __sen(__is); if (__sen) { @@ -1720,7 +1720,7 @@ operator>>(basic_istream<_CharT, _Traits>& __is, bitset<_Size>& __x) { __is.__set_badbit_and_consider_rethrow(); } -#endif +#endif // _LIBCPP_NO_EXCEPTIONS return __is; } diff --git a/include/iterator b/include/iterator index 877474bc9..51f4d4ffc 100644 --- a/include/iterator +++ b/include/iterator @@ -88,7 +88,7 @@ public: typedef typename iterator_traits::difference_type difference_type; typedef typename iterator_traits::reference reference; typedef typename iterator_traits::pointer pointer; - + reverse_iterator(); explicit reverse_iterator(Iterator x); template reverse_iterator(const reverse_iterator& u); @@ -520,7 +520,7 @@ public: typedef typename iterator_traits<_Iter>::difference_type difference_type; typedef typename iterator_traits<_Iter>::reference reference; typedef typename iterator_traits<_Iter>::pointer pointer; - + _LIBCPP_INLINE_VISIBILITY reverse_iterator() : current() {} _LIBCPP_INLINE_VISIBILITY explicit reverse_iterator(_Iter __x) : __t(__x), current(__x) {} template _LIBCPP_INLINE_VISIBILITY reverse_iterator(const reverse_iterator<_Up>& __u) @@ -629,7 +629,7 @@ public: #ifdef _LIBCPP_MOVE _LIBCPP_INLINE_VISIBILITY back_insert_iterator& operator=(typename _Container::value_type&& __value) {container->push_back(_STD::move(__value)); return *this;} -#endif +#endif // _LIBCPP_MOVE _LIBCPP_INLINE_VISIBILITY back_insert_iterator& operator*() {return *this;} _LIBCPP_INLINE_VISIBILITY back_insert_iterator& operator++() {return *this;} _LIBCPP_INLINE_VISIBILITY back_insert_iterator operator++(int) {return *this;} @@ -662,7 +662,7 @@ public: #ifdef _LIBCPP_MOVE _LIBCPP_INLINE_VISIBILITY front_insert_iterator& operator=(typename _Container::value_type&& __value) {container->push_front(_STD::move(__value)); return *this;} -#endif +#endif // _LIBCPP_MOVE _LIBCPP_INLINE_VISIBILITY front_insert_iterator& operator*() {return *this;} _LIBCPP_INLINE_VISIBILITY front_insert_iterator& operator++() {return *this;} _LIBCPP_INLINE_VISIBILITY front_insert_iterator operator++(int) {return *this;} @@ -697,7 +697,7 @@ public: #ifdef _LIBCPP_MOVE _LIBCPP_INLINE_VISIBILITY insert_iterator& operator=(typename _Container::value_type&& __value) {iter = container->insert(iter, _STD::move(__value)); ++iter; return *this;} -#endif +#endif // _LIBCPP_MOVE _LIBCPP_INLINE_VISIBILITY insert_iterator& operator*() {return *this;} _LIBCPP_INLINE_VISIBILITY insert_iterator& operator++() {return *this;} _LIBCPP_INLINE_VISIBILITY insert_iterator& operator++(int) {return *this;} @@ -895,7 +895,7 @@ public: #else typedef typename iterator_traits::reference reference; #endif - + _LIBCPP_INLINE_VISIBILITY move_iterator() : __i() {} _LIBCPP_INLINE_VISIBILITY explicit move_iterator(_Iter __x) : __i(__x) {} template _LIBCPP_INLINE_VISIBILITY move_iterator(const move_iterator<_Up>& __u) @@ -1091,37 +1091,37 @@ private: friend bool operator==(const __wrap_iter<_Iter1>&, const __wrap_iter<_Iter2>&); - + template friend bool operator<(const __wrap_iter<_Iter1>&, const __wrap_iter<_Iter2>&); - + template friend bool operator!=(const __wrap_iter<_Iter1>&, const __wrap_iter<_Iter2>&); - + template friend bool operator>(const __wrap_iter<_Iter1>&, const __wrap_iter<_Iter2>&); - + template friend bool operator>=(const __wrap_iter<_Iter1>&, const __wrap_iter<_Iter2>&); - + template friend bool operator<=(const __wrap_iter<_Iter1>&, const __wrap_iter<_Iter2>&); - + template friend typename __wrap_iter<_Iter1>::difference_type operator-(const __wrap_iter<_Iter1>&, const __wrap_iter<_Iter2>&); - + template friend __wrap_iter<_Iter1> @@ -1260,7 +1260,7 @@ private: iterator_type __i; __debug_iter* __next; __container_type* __cont; - + public: _LIBCPP_INLINE_VISIBILITY __debug_iter() : __next(0), __cont(0) {} _LIBCPP_INLINE_VISIBILITY __debug_iter(const __debug_iter& __x) @@ -1297,7 +1297,7 @@ private: void __remove_owner(); static void __remove_all(__container_type* __c); static void swap(__container_type* __x, __container_type* __y); - + _LIBCPP_INLINE_VISIBILITY bool __is_deref() const {return __is_deref(__is_random_access_iterator());} bool __is_deref(false_type) const; @@ -1327,37 +1327,37 @@ private: friend bool operator==(const __debug_iter<_Cp, _Iter1>&, const __debug_iter<_Cp, _Iter2>&); - + template friend bool operator<(const __debug_iter<_Cp, _Iter1>&, const __debug_iter<_Cp, _Iter2>&); - + template friend bool operator!=(const __debug_iter<_Cp, _Iter1>&, const __debug_iter<_Cp, _Iter2>&); - + template friend bool operator>(const __debug_iter<_Cp, _Iter1>&, const __debug_iter<_Cp, _Iter2>&); - + template friend bool operator>=(const __debug_iter<_Cp, _Iter1>&, const __debug_iter<_Cp, _Iter2>&); - + template friend bool operator<=(const __debug_iter<_Cp, _Iter1>&, const __debug_iter<_Cp, _Iter2>&); - + template friend typename __debug_iter<_Cp, _Iter1>::difference_type operator-(const __debug_iter<_Cp, _Iter1>&, const __debug_iter<_Cp, _Iter2>&); - + template friend __debug_iter<_Cp, _Iter1> @@ -1376,7 +1376,7 @@ __debug_iter<_Container, _Iter>::operator=(const __debug_iter& __x) } return *this; } - + template void __debug_iter<_Container, _Iter>::__set_owner(const __container_type* __c) @@ -1649,7 +1649,7 @@ end(const _C& __c) -> decltype(__c.end()) return __c.end(); } -#else +#else // defined(_LIBCPP_MOVE) && !defined(_LIBCPP_HAS_NO_DECLTYPE) template inline @@ -1683,7 +1683,7 @@ end(const _C& __c) return __c.end(); } -#endif +#endif // defined(_LIBCPP_MOVE) && !defined(_LIBCPP_HAS_NO_DECLTYPE) template inline diff --git a/include/list b/include/list index 41d20f83c..2fb90aae5 100644 --- a/include/list +++ b/include/list @@ -505,7 +505,7 @@ public: list(list&& __c); list(list&& __c, const allocator_type& __a); list& operator=(list&& __c); -#endif +#endif // _LIBCPP_MOVE list& operator=(initializer_list __il) {assign(__il.begin(), __il.end()); return *this;} @@ -551,7 +551,7 @@ public: template iterator emplace(const_iterator __p, _Args&&... __args); iterator insert(const_iterator __p, value_type&& __x); -#endif +#endif // _LIBCPP_MOVE void push_front(const value_type& __x); void push_back(const value_type& __x); @@ -584,12 +584,12 @@ public: #ifdef _LIBCPP_MOVE void splice(const_iterator __p, list&& __c, const_iterator __i) {splice(__p, __c, __i);} -#endif +#endif // _LIBCPP_MOVE void splice(const_iterator __p, list& __c, const_iterator __f, const_iterator __l); #ifdef _LIBCPP_MOVE void splice(const_iterator __p, list&& __c, const_iterator __f, const_iterator __l) {splice(__p, __c, __f, __l);} -#endif +#endif // _LIBCPP_MOVE void remove(const value_type& __x); template void remove_if(_Pred __pred); @@ -605,7 +605,7 @@ public: #ifdef _LIBCPP_MOVE template void merge(list&& __c, _Comp __comp) {merge(__c, __comp);} -#endif +#endif // _LIBCPP_MOVE void sort(); template void sort(_Comp __comp); @@ -792,7 +792,7 @@ list<_Tp, _Alloc>::__move_assign(list& __c, true_type) splice(end(), __c); } -#endif +#endif // _LIBCPP_MOVE template template @@ -866,7 +866,7 @@ list<_Tp, _Alloc>::insert(const_iterator __p, size_type __n, const value_type& _ #ifndef _LIBCPP_NO_EXCEPTIONS try { -#endif +#endif // _LIBCPP_NO_EXCEPTIONS for (--__n; __n != 0; --__n, ++__e, ++__ds) { __hold.reset(__node_alloc_traits::allocate(__na, 1)); @@ -890,7 +890,7 @@ list<_Tp, _Alloc>::insert(const_iterator __p, size_type __n, const value_type& _ } throw; } -#endif +#endif // _LIBCPP_NO_EXCEPTIONS __link_nodes(const_cast<__node&>(*__p.__ptr_), *__r.__ptr_, *__e.__ptr_); base::__sz() += __ds; } @@ -919,7 +919,7 @@ list<_Tp, _Alloc>::insert(const_iterator __p, _InpIter __f, _InpIter __l, #ifndef _LIBCPP_NO_EXCEPTIONS try { -#endif +#endif // _LIBCPP_NO_EXCEPTIONS for (++__f; __f != __l; ++__f, ++__e, ++__ds) { __hold.reset(__node_alloc_traits::allocate(__na, 1)); @@ -943,7 +943,7 @@ list<_Tp, _Alloc>::insert(const_iterator __p, _InpIter __f, _InpIter __l, } throw; } -#endif +#endif // _LIBCPP_NO_EXCEPTIONS __link_nodes(const_cast<__node&>(*__p.__ptr_), *__r.__ptr_, *__e.__ptr_); base::__sz() += __ds; } @@ -1061,7 +1061,7 @@ list<_Tp, _Alloc>::insert(const_iterator __p, value_type&& __x) return iterator(__hold.release()); } -#endif +#endif // _LIBCPP_MOVE template void @@ -1142,7 +1142,7 @@ list<_Tp, _Alloc>::resize(size_type __n) #ifndef _LIBCPP_NO_EXCEPTIONS try { -#endif +#endif // _LIBCPP_NO_EXCEPTIONS for (--__n; __n != 0; --__n, ++__e, ++__ds) { __hold.reset(__node_alloc_traits::allocate(__na, 1)); @@ -1166,7 +1166,7 @@ list<_Tp, _Alloc>::resize(size_type __n) } throw; } -#endif +#endif // _LIBCPP_NO_EXCEPTIONS __link_nodes(static_cast<__node&>(base::__end_), *__r.__ptr_, *__e.__ptr_); base::__sz() += __ds; } @@ -1193,7 +1193,7 @@ list<_Tp, _Alloc>::resize(size_type __n, const value_type& __x) #ifndef _LIBCPP_NO_EXCEPTIONS try { -#endif +#endif // _LIBCPP_NO_EXCEPTIONS for (--__n; __n != 0; --__n, ++__e, ++__ds) { __hold.reset(__node_alloc_traits::allocate(__na, 1)); @@ -1217,10 +1217,10 @@ list<_Tp, _Alloc>::resize(size_type __n, const value_type& __x) } throw; } -#endif +#endif // _LIBCPP_NO_EXCEPTIONS __link_nodes(static_cast<__node&>(base::__end_), *__r.__ptr_, *__e.__ptr_); base::__sz() += __ds; - } + } } template diff --git a/include/locale b/include/locale index b86143e6f..1bef153e4 100644 --- a/include/locale +++ b/include/locale @@ -264,7 +264,7 @@ __nolocale_isdigit(int __c) return isdigit_l(__c, 0); } -#else /* !__APPLE__ */ +#else // __APPLE__ inline int __nolocale_sprintf(char* __restrict __str, const char* __restrict __format, ...) @@ -315,7 +315,7 @@ __nolocale_isdigit(int __c) { return isdigit(__c); } -#endif /* __APPLE__ */ +#endif // __APPLE__ // __scan_keyword // Scans [__b, __e) until a match is found in the basic_strings range @@ -456,7 +456,6 @@ struct __num_get_base void __check_grouping(const string& __grouping, unsigned* __g, unsigned* __g_end, ios_base::iostate& __err); - template struct __num_get : protected __num_get_base @@ -836,7 +835,7 @@ num_get<_CharT, _InputIterator>::do_get(iter_type __b, iter_type __e, unsigned* __g_end = __g; unsigned __dc = 0; for (; __b != __e; ++__b) - if (this->__stage2_int_loop(*__b, __base, __a, __a_end, __dc, + if (this->__stage2_int_loop(*__b, __base, __a, __a_end, __dc, __thousands_sep, __grouping, __g, __g_end, __atoms)) break; @@ -871,8 +870,8 @@ num_get<_CharT, _InputIterator>::do_get(iter_type __b, iter_type __e, unsigned* __g_end = __g; unsigned __dc = 0; for (; __b != __e; ++__b) - if (this->__stage2_int_loop(*__b, __base, __a, __a_end, __dc, - __thousands_sep, __grouping, __g, __g_end, + if (this->__stage2_int_loop(*__b, __base, __a, __a_end, __dc, + __thousands_sep, __grouping, __g, __g_end, __atoms)) break; if (__grouping.size() != 0 && __g_end-__g < __num_get_base::__num_get_buf_sz) @@ -906,7 +905,7 @@ num_get<_CharT, _InputIterator>::do_get(iter_type __b, iter_type __e, unsigned* __g_end = __g; unsigned __dc = 0; for (; __b != __e; ++__b) - if (this->__stage2_int_loop(*__b, __base, __a, __a_end, __dc, + if (this->__stage2_int_loop(*__b, __base, __a, __a_end, __dc, __thousands_sep, __grouping, __g, __g_end, __atoms)) break; @@ -941,7 +940,7 @@ num_get<_CharT, _InputIterator>::do_get(iter_type __b, iter_type __e, unsigned* __g_end = __g; unsigned __dc = 0; for (; __b != __e; ++__b) - if (this->__stage2_int_loop(*__b, __base, __a, __a_end, __dc, + if (this->__stage2_int_loop(*__b, __base, __a, __a_end, __dc, __thousands_sep, __grouping, __g, __g_end, __atoms)) break; @@ -976,7 +975,7 @@ num_get<_CharT, _InputIterator>::do_get(iter_type __b, iter_type __e, unsigned* __g_end = __g; unsigned __dc = 0; for (; __b != __e; ++__b) - if (this->__stage2_int_loop(*__b, __base, __a, __a_end, __dc, + if (this->__stage2_int_loop(*__b, __base, __a, __a_end, __dc, __thousands_sep, __grouping, __g, __g_end, __atoms)) break; @@ -1011,7 +1010,7 @@ num_get<_CharT, _InputIterator>::do_get(iter_type __b, iter_type __e, unsigned* __g_end = __g; unsigned __dc = 0; for (; __b != __e; ++__b) - if (this->__stage2_int_loop(*__b, __base, __a, __a_end, __dc, + if (this->__stage2_int_loop(*__b, __base, __a, __a_end, __dc, __thousands_sep, __grouping, __g, __g_end, __atoms)) break; @@ -1039,8 +1038,8 @@ num_get<_CharT, _InputIterator>::do_get(iter_type __b, iter_type __e, char_type __atoms[32]; char_type __decimal_point; char_type __thousands_sep; - string __grouping = this->__stage2_float_prep(__iob, __atoms, - __decimal_point, + string __grouping = this->__stage2_float_prep(__iob, __atoms, + __decimal_point, __thousands_sep); char __a[__num_get_base::__num_get_buf_sz] = {0}; char* __a_end = __a; @@ -1050,8 +1049,8 @@ num_get<_CharT, _InputIterator>::do_get(iter_type __b, iter_type __e, bool __in_units = true; char __exp = 'E'; for (; __b != __e; ++__b) - if (this->__stage2_float_loop(*__b, __in_units, __exp, __a, __a_end, - __decimal_point, __thousands_sep, + if (this->__stage2_float_loop(*__b, __in_units, __exp, __a, __a_end, + __decimal_point, __thousands_sep, __grouping, __g, __g_end, __dc, __atoms)) break; @@ -1079,8 +1078,8 @@ num_get<_CharT, _InputIterator>::do_get(iter_type __b, iter_type __e, char_type __atoms[32]; char_type __decimal_point; char_type __thousands_sep; - string __grouping = this->__stage2_float_prep(__iob, __atoms, - __decimal_point, + string __grouping = this->__stage2_float_prep(__iob, __atoms, + __decimal_point, __thousands_sep); char __a[__num_get_base::__num_get_buf_sz] = {0}; char* __a_end = __a; @@ -1090,8 +1089,8 @@ num_get<_CharT, _InputIterator>::do_get(iter_type __b, iter_type __e, bool __in_units = true; char __exp = 'E'; for (; __b != __e; ++__b) - if (this->__stage2_float_loop(*__b, __in_units, __exp, __a, __a_end, - __decimal_point, __thousands_sep, + if (this->__stage2_float_loop(*__b, __in_units, __exp, __a, __a_end, + __decimal_point, __thousands_sep, __grouping, __g, __g_end, __dc, __atoms)) break; @@ -1119,7 +1118,7 @@ num_get<_CharT, _InputIterator>::do_get(iter_type __b, iter_type __e, char_type __atoms[32]; char_type __decimal_point; char_type __thousands_sep; - string __grouping = this->__stage2_float_prep(__iob, __atoms, + string __grouping = this->__stage2_float_prep(__iob, __atoms, __decimal_point, __thousands_sep); char __a[__num_get_base::__num_get_buf_sz] = {0}; @@ -1130,8 +1129,8 @@ num_get<_CharT, _InputIterator>::do_get(iter_type __b, iter_type __e, bool __in_units = true; char __exp = 'E'; for (; __b != __e; ++__b) - if (this->__stage2_float_loop(*__b, __in_units, __exp, __a, __a_end, - __decimal_point, __thousands_sep, + if (this->__stage2_float_loop(*__b, __in_units, __exp, __a, __a_end, + __decimal_point, __thousands_sep, __grouping, __g, __g_end, __dc, __atoms)) break; @@ -1168,8 +1167,8 @@ num_get<_CharT, _InputIterator>::do_get(iter_type __b, iter_type __e, unsigned* __g_end = __g; unsigned __dc = 0; for (; __b != __e; ++__b) - if (this->__stage2_int_loop(*__b, __base, __a, __a_end, __dc, - __thousands_sep, __grouping, + if (this->__stage2_int_loop(*__b, __base, __a, __a_end, __dc, + __thousands_sep, __grouping, __g, __g_end, __atoms)) break; // Stage 3 @@ -2779,7 +2778,7 @@ public: protected: ~money_get() {} - + virtual iter_type do_get(iter_type __b, iter_type __e, bool __intl, ios_base& __iob, ios_base::iostate& __err, long double& __v) const; @@ -2867,7 +2866,7 @@ money_get<_CharT, _InputIterator>::__do_get(iter_type& __b, iter_type __e, return false; } } - // drop through + // drop through case money_base::none: if (__p != 3) { @@ -3629,7 +3628,7 @@ wstring_convert<_Codecvt, _Elem, _Wide_alloc, _Byte_alloc>:: __wc.__cvtptr_ = nullptr; } -#endif +#endif // _LIBCPP_MOVE template wstring_convert<_Codecvt, _Elem, _Wide_alloc, _Byte_alloc>::~wstring_convert() @@ -3693,7 +3692,7 @@ wstring_convert<_Codecvt, _Elem, _Wide_alloc, _Byte_alloc>:: #ifndef _LIBCPP_NO_EXCEPTIONS if (__wide_err_string_.empty()) throw range_error("wstring_convert: from_bytes error"); -#endif +#endif // _LIBCPP_NO_EXCEPTIONS return __wide_err_string_; } @@ -3781,7 +3780,7 @@ wstring_convert<_Codecvt, _Elem, _Wide_alloc, _Byte_alloc>:: #ifndef _LIBCPP_NO_EXCEPTIONS if (__byte_err_string_.empty()) throw range_error("wstring_convert: to_bytes error"); -#endif +#endif // _LIBCPP_NO_EXCEPTIONS return __byte_err_string_; } diff --git a/include/map b/include/map index fd06c21d1..6fe4bcd31 100644 --- a/include/map +++ b/include/map @@ -375,8 +375,6 @@ public: bool operator()(const _Key& __x, const _Key& __y) const {return static_cast(*this)(__x, __y);} - - // bool operator()(const _Tp& __x, const _Tp& __y) const // {return static_cast(*this)(__x.first, __y.first);} // bool operator()(const typename _Tp::first_type& __x, const _Tp& __y) const @@ -420,8 +418,6 @@ public: bool operator()(const _Key& __x, const _Key& __y) const {return comp(__x, __y);} - - // bool operator()(const _Tp& __x, const _Tp& __y) const // {return comp(__x.first, __y.first);} // bool operator()(const typename _Tp::first_type& __x, const _Tp& __y) const @@ -467,7 +463,7 @@ public: { __x.__value_constructed = false; } -#endif +#endif // _LIBCPP_MOVE void operator()(pointer __p) { @@ -709,7 +705,7 @@ public: return *this; } -#endif +#endif // _LIBCPP_MOVE explicit map(const allocator_type& __a) : __tree_(__a) @@ -794,7 +790,7 @@ public: iterator insert(const_iterator __pos, _P&& __p) {return __tree_.__insert_unique(__pos.__i_, _STD::forward<_P>(__p));} -#endif +#endif // _LIBCPP_MOVE pair insert(const value_type& __v) {return __tree_.__insert_unique(__v);} @@ -857,7 +853,7 @@ private: template ::value>::type> __node_holder __construct_node(_A0&& __a0, _Args&& ...__args); -#else +#else // _LIBCPP_MOVE __node_holder __construct_node(const key_type& __k); #endif @@ -1077,7 +1073,7 @@ map<_Key, _Tp, _Compare, _Allocator>::__construct_node(_A0&& __a0, _Args&& ...__ return __h; } -#else +#else // _LIBCPP_MOVE template typename map<_Key, _Tp, _Compare, _Allocator>::__node_holder @@ -1092,7 +1088,7 @@ map<_Key, _Tp, _Compare, _Allocator>::__construct_node(const key_type& __k) return _STD::move(__h); } -#endif +#endif // _LIBCPP_MOVE template _Tp& @@ -1128,7 +1124,7 @@ map<_Key, _Tp, _Compare, _Allocator>::operator[](key_type&& __k) return __r->__value_.second; } -#endif +#endif // _LIBCPP_MOVE template _Tp& @@ -1139,7 +1135,7 @@ map<_Key, _Tp, _Compare, _Allocator>::at(const key_type& __k) #ifndef _LIBCPP_NO_EXCEPTIONS if (__child == nullptr) throw out_of_range("map::at: key not found"); -#endif +#endif // _LIBCPP_NO_EXCEPTIONS return static_cast<__node_pointer>(__child)->__value_.second; } @@ -1152,7 +1148,7 @@ map<_Key, _Tp, _Compare, _Allocator>::at(const key_type& __k) const #ifndef _LIBCPP_NO_EXCEPTIONS if (__child == nullptr) throw out_of_range("map::at: key not found"); -#endif +#endif // _LIBCPP_NO_EXCEPTIONS return static_cast<__node_const_pointer>(__child)->__value_.second; } @@ -1189,7 +1185,7 @@ map<_Key, _Tp, _Compare, _Allocator>::emplace_hint(const_iterator __p, return __r; } -#endif +#endif // _LIBCPP_MOVE template inline @@ -1368,7 +1364,7 @@ public: __tree_.__assign_multi(__il.begin(), __il.end()); return *this; } -#endif +#endif // _LIBCPP_MOVE explicit multimap(const allocator_type& __a) : __tree_(__a) @@ -1443,7 +1439,7 @@ public: iterator insert(const_iterator __pos, _P&& __p) {return __tree_.__insert_multi(__pos.__i_, _STD::forward<_P>(__p));} -#endif +#endif // _LIBCPP_MOVE iterator insert(const value_type& __v) {return __tree_.__insert_multi(__v);} @@ -1501,7 +1497,7 @@ private: template ::value>::type> __node_holder __construct_node(_A0&& __a0, _Args&& ...__args); -#endif +#endif // _LIBCPP_MOVE }; #ifdef _LIBCPP_MOVE @@ -1563,7 +1559,7 @@ multimap<_Key, _Tp, _Compare, _Allocator>::__construct_node(_A0&& __a0, _Args&& return __h; } -#endif +#endif // _LIBCPP_MOVE #ifdef _LIBCPP_MOVE @@ -1597,7 +1593,7 @@ multimap<_Key, _Tp, _Compare, _Allocator>::emplace_hint(const_iterator __p, return __r; } -#endif +#endif // _LIBCPP_MOVE template inline diff --git a/include/memory b/include/memory index 8ee0dd149..db80d4135 100644 --- a/include/memory +++ b/include/memory @@ -28,9 +28,9 @@ struct pointer_traits typedef Ptr pointer; typedef
element_type; typedef
difference_type; - + template using rebind =
; - + static pointer pointer_to(
); }; @@ -259,7 +259,7 @@ public: unique_ptr(nullptr_t) : unique_ptr() { } // destructor - ∼unique_ptr(); + ~unique_ptr(); // assignment unique_ptr& operator=(unique_ptr&& u); @@ -531,7 +531,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD // allocator_arg_t -struct allocator_arg_t { }; +struct allocator_arg_t { }; extern const allocator_arg_t allocator_arg; @@ -558,7 +558,6 @@ public: template struct rebind {typedef allocator<_Up> other;}; }; - // pointer_traits template @@ -595,7 +594,7 @@ struct __pointer_traits_element_type<_Sp<_Tp, _Args...>, false> typedef _Tp type; }; -#else +#else // _LIBCPP_HAS_NO_VARIADICS template