Index: libcxx/include/__algorithm/stable_partition.h =================================================================== --- libcxx/include/__algorithm/stable_partition.h +++ libcxx/include/__algorithm/stable_partition.h @@ -137,7 +137,7 @@ typedef typename iterator_traits<_ForwardIterator>::difference_type difference_type; typedef typename iterator_traits<_ForwardIterator>::value_type value_type; difference_type __len = _IterOps<_AlgPolicy>::distance(__first, __last); - pair __p(0, 0); + pair __p(nullptr, 0); unique_ptr __h; if (__len >= __alloc_limit) { @@ -291,7 +291,7 @@ // *__last is known to be true // __len >= 2 difference_type __len = _IterOps<_AlgPolicy>::distance(__first, __last) + 1; - pair __p(0, 0); + pair __p(nullptr, 0); unique_ptr __h; if (__len >= __alloc_limit) { Index: libcxx/include/__algorithm/stable_sort.h =================================================================== --- libcxx/include/__algorithm/stable_sort.h +++ libcxx/include/__algorithm/stable_sort.h @@ -217,7 +217,7 @@ using difference_type = typename iterator_traits<_RandomAccessIterator>::difference_type; difference_type __len = __last - __first; - pair __buf(0, 0); + pair __buf(nullptr, 0); unique_ptr __h; if (__len > static_cast(__stable_sort_switch::value)) { // TODO: Remove the use of std::get_temporary_buffer Index: libcxx/include/__atomic/is_always_lock_free.h =================================================================== --- libcxx/include/__atomic/is_always_lock_free.h +++ libcxx/include/__atomic/is_always_lock_free.h @@ -20,7 +20,7 @@ template struct __libcpp_is_always_lock_free { // __atomic_always_lock_free is available in all Standard modes - static const bool __value = __atomic_always_lock_free(sizeof(_Tp), 0); + static const bool __value = __atomic_always_lock_free(sizeof(_Tp), nullptr); }; _LIBCPP_END_NAMESPACE_STD Index: libcxx/include/__compare/ordering.h =================================================================== --- libcxx/include/__compare/ordering.h +++ libcxx/include/__compare/ordering.h @@ -39,9 +39,15 @@ template inline constexpr bool __one_of_v = (is_same_v<_Tp, _Args> || ...); +void __literal_zero_is_expected(); + struct _CmpUnspecifiedParam { - _LIBCPP_HIDE_FROM_ABI constexpr - _CmpUnspecifiedParam(int _CmpUnspecifiedParam::*) noexcept {} + consteval + _CmpUnspecifiedParam(int __literal_zero) noexcept { + if (__literal_zero != 0) { + __literal_zero_is_expected(); + } + } template>> _CmpUnspecifiedParam(_Tp) = delete; Index: libcxx/include/__exception/nested_exception.h =================================================================== --- libcxx/include/__exception/nested_exception.h +++ libcxx/include/__exception/nested_exception.h @@ -86,7 +86,7 @@ template inline _LIBCPP_HIDE_FROM_ABI void -rethrow_if_nested(const _Ep& __e, __enable_if_t< __can_dynamic_cast<_Ep, nested_exception>::value>* = 0) { +rethrow_if_nested(const _Ep& __e, __enable_if_t< __can_dynamic_cast<_Ep, nested_exception>::value>* = nullptr) { const nested_exception* __nep = dynamic_cast(std::addressof(__e)); if (__nep) __nep->rethrow_nested(); @@ -94,7 +94,7 @@ template inline _LIBCPP_HIDE_FROM_ABI void -rethrow_if_nested(const _Ep&, __enable_if_t::value>* = 0) {} +rethrow_if_nested(const _Ep&, __enable_if_t::value>* = nullptr) {} } // namespace std Index: libcxx/include/__functional/weak_result_type.h =================================================================== --- libcxx/include/__functional/weak_result_type.h +++ libcxx/include/__functional/weak_result_type.h @@ -29,9 +29,9 @@ { private: template static false_type __test(...); - template static true_type __test(typename _Up::result_type* = 0); + template static true_type __test(typename _Up::result_type* = nullptr); public: - static const bool value = decltype(__test<_Tp>(0))::value; + static const bool value = decltype(__test<_Tp>(nullptr))::value; }; // __weak_result_type @@ -47,8 +47,8 @@ __test(const volatile __unary_function<_Ap, _Rp>*); public: - static const bool value = !is_same::value; - typedef decltype(__test((_Tp*)0)) type; + static const bool value = !is_same::value; + typedef decltype(__test((_Tp*)nullptr)) type; }; template @@ -62,8 +62,8 @@ __test(const volatile __binary_function<_A1, _A2, _Rp>*); public: - static const bool value = !is_same::value; - typedef decltype(__test((_Tp*)0)) type; + static const bool value = !is_same::value; + typedef decltype(__test((_Tp*)nullptr)) type; }; template ::value> Index: libcxx/include/__iterator/iterator_traits.h =================================================================== --- libcxx/include/__iterator/iterator_traits.h +++ libcxx/include/__iterator/iterator_traits.h @@ -133,7 +133,7 @@ __void_t* = nullptr, __void_t* = nullptr); public: - static const bool value = decltype(__test<_Tp>(0,0,0,0,0))::value; + static const bool value = decltype(__test<_Tp>(nullptr,nullptr,nullptr,nullptr,nullptr))::value; }; Index: libcxx/include/__memory/auto_ptr.h =================================================================== --- libcxx/include/__memory/auto_ptr.h +++ libcxx/include/__memory/auto_ptr.h @@ -34,7 +34,7 @@ public: typedef _Tp element_type; - _LIBCPP_INLINE_VISIBILITY explicit auto_ptr(_Tp* __p = 0) _NOEXCEPT : __ptr_(__p) {} + _LIBCPP_INLINE_VISIBILITY explicit auto_ptr(_Tp* __p = nullptr) _NOEXCEPT : __ptr_(__p) {} _LIBCPP_INLINE_VISIBILITY auto_ptr(auto_ptr& __p) _NOEXCEPT : __ptr_(__p.release()) {} template _LIBCPP_INLINE_VISIBILITY auto_ptr(auto_ptr<_Up>& __p) _NOEXCEPT : __ptr_(__p.release()) {} @@ -56,7 +56,7 @@ __ptr_ = nullptr; return __t; } - _LIBCPP_INLINE_VISIBILITY void reset(_Tp* __p = 0) _NOEXCEPT + _LIBCPP_INLINE_VISIBILITY void reset(_Tp* __p = nullptr) _NOEXCEPT { if (__ptr_ != __p) delete __ptr_; Index: libcxx/include/__memory/pointer_traits.h =================================================================== --- libcxx/include/__memory/pointer_traits.h +++ libcxx/include/__memory/pointer_traits.h @@ -79,10 +79,10 @@ private: template static false_type __test(...); _LIBCPP_SUPPRESS_DEPRECATED_PUSH - template static true_type __test(typename _Xp::template rebind<_Up>* = 0); + template static true_type __test(typename _Xp::template rebind<_Up>* = nullptr); _LIBCPP_SUPPRESS_DEPRECATED_POP public: - static const bool value = decltype(__test<_Tp>(0))::value; + static const bool value = decltype(__test<_Tp>(nullptr))::value; }; template ::value> Index: libcxx/include/__memory/shared_ptr.h =================================================================== --- libcxx/include/__memory/shared_ptr.h +++ libcxx/include/__memory/shared_ptr.h @@ -1577,18 +1577,18 @@ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR weak_ptr() _NOEXCEPT; template _LIBCPP_INLINE_VISIBILITY weak_ptr(shared_ptr<_Yp> const& __r, - typename enable_if<__compatible_with<_Yp, _Tp>::value, __nat*>::type = 0) + typename enable_if<__compatible_with<_Yp, _Tp>::value, __nat*>::type = nullptr) _NOEXCEPT; _LIBCPP_INLINE_VISIBILITY weak_ptr(weak_ptr const& __r) _NOEXCEPT; template _LIBCPP_INLINE_VISIBILITY weak_ptr(weak_ptr<_Yp> const& __r, - typename enable_if<__compatible_with<_Yp, _Tp>::value, __nat*>::type = 0) + typename enable_if<__compatible_with<_Yp, _Tp>::value, __nat*>::type = nullptr) _NOEXCEPT; _LIBCPP_INLINE_VISIBILITY weak_ptr(weak_ptr&& __r) _NOEXCEPT; template _LIBCPP_INLINE_VISIBILITY weak_ptr(weak_ptr<_Yp>&& __r, - typename enable_if<__compatible_with<_Yp, _Tp>::value, __nat*>::type = 0) + typename enable_if<__compatible_with<_Yp, _Tp>::value, __nat*>::type = nullptr) _NOEXCEPT; ~weak_ptr(); Index: libcxx/include/__memory/temporary_buffer.h =================================================================== --- libcxx/include/__memory/temporary_buffer.h +++ libcxx/include/__memory/temporary_buffer.h @@ -27,7 +27,7 @@ pair<_Tp*, ptrdiff_t> get_temporary_buffer(ptrdiff_t __n) _NOEXCEPT { - pair<_Tp*, ptrdiff_t> __r(0, 0); + pair<_Tp*, ptrdiff_t> __r(nullptr, 0); const ptrdiff_t __m = (~ptrdiff_t(0) ^ ptrdiff_t(ptrdiff_t(1) << (sizeof(ptrdiff_t) * __CHAR_BIT__ - 1))) / sizeof(_Tp); Index: libcxx/include/__memory/unique_ptr.h =================================================================== --- libcxx/include/__memory/unique_ptr.h +++ libcxx/include/__memory/unique_ptr.h @@ -57,7 +57,7 @@ #endif template _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 default_delete( - const default_delete<_Up>&, typename enable_if::value>::type* = 0) _NOEXCEPT {} + const default_delete<_Up>&, typename enable_if::value>::type* = nullptr) _NOEXCEPT {} _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 void operator()(_Tp* __ptr) const _NOEXCEPT { static_assert(sizeof(_Tp) >= 0, "cannot delete an incomplete type"); @@ -82,7 +82,7 @@ template _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 - default_delete(const default_delete<_Up[]>&, typename _EnableIfConvertible<_Up>::type* = 0) _NOEXCEPT {} + default_delete(const default_delete<_Up[]>&, typename _EnableIfConvertible<_Up>::type* = nullptr) _NOEXCEPT {} template _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 typename _EnableIfConvertible<_Up>::type Index: libcxx/include/__memory/uses_allocator.h =================================================================== --- libcxx/include/__memory/uses_allocator.h +++ libcxx/include/__memory/uses_allocator.h @@ -25,9 +25,9 @@ { private: template static false_type __test(...); - template static true_type __test(typename _Up::allocator_type* = 0); + template static true_type __test(typename _Up::allocator_type* = nullptr); public: - static const bool value = decltype(__test<_Tp>(0))::value; + static const bool value = decltype(__test<_Tp>(nullptr))::value; }; template ::value> Index: libcxx/include/__random/discard_block_engine.h =================================================================== --- libcxx/include/__random/discard_block_engine.h +++ libcxx/include/__random/discard_block_engine.h @@ -76,7 +76,7 @@ _LIBCPP_INLINE_VISIBILITY explicit discard_block_engine(_Sseq& __q, typename enable_if<__is_seed_sequence<_Sseq, discard_block_engine>::value && - !is_convertible<_Sseq, _Engine>::value>::type* = 0) + !is_convertible<_Sseq, _Engine>::value>::type* = nullptr) : __e_(__q), __n_(0) {} _LIBCPP_INLINE_VISIBILITY void seed() {__e_.seed(); __n_ = 0;} Index: libcxx/include/__random/independent_bits_engine.h =================================================================== --- libcxx/include/__random/independent_bits_engine.h +++ libcxx/include/__random/independent_bits_engine.h @@ -108,7 +108,7 @@ _LIBCPP_INLINE_VISIBILITY explicit independent_bits_engine(_Sseq& __q, typename enable_if<__is_seed_sequence<_Sseq, independent_bits_engine>::value && - !is_convertible<_Sseq, _Engine>::value>::type* = 0) + !is_convertible<_Sseq, _Engine>::value>::type* = nullptr) : __e_(__q) {} _LIBCPP_INLINE_VISIBILITY void seed() {__e_.seed();} Index: libcxx/include/__random/linear_congruential_engine.h =================================================================== --- libcxx/include/__random/linear_congruential_engine.h +++ libcxx/include/__random/linear_congruential_engine.h @@ -249,7 +249,7 @@ template _LIBCPP_INLINE_VISIBILITY explicit linear_congruential_engine(_Sseq& __q, - typename enable_if<__is_seed_sequence<_Sseq, linear_congruential_engine>::value>::type* = 0) + typename enable_if<__is_seed_sequence<_Sseq, linear_congruential_engine>::value>::type* = nullptr) {seed(__q);} _LIBCPP_INLINE_VISIBILITY void seed(result_type __s = default_seed) Index: libcxx/include/__random/mersenne_twister_engine.h =================================================================== --- libcxx/include/__random/mersenne_twister_engine.h +++ libcxx/include/__random/mersenne_twister_engine.h @@ -138,7 +138,7 @@ template _LIBCPP_INLINE_VISIBILITY explicit mersenne_twister_engine(_Sseq& __q, - typename enable_if<__is_seed_sequence<_Sseq, mersenne_twister_engine>::value>::type* = 0) + typename enable_if<__is_seed_sequence<_Sseq, mersenne_twister_engine>::value>::type* = nullptr) {seed(__q);} void seed(result_type __sd = default_seed); template Index: libcxx/include/__random/shuffle_order_engine.h =================================================================== --- libcxx/include/__random/shuffle_order_engine.h +++ libcxx/include/__random/shuffle_order_engine.h @@ -102,7 +102,7 @@ _LIBCPP_INLINE_VISIBILITY explicit shuffle_order_engine(_Sseq& __q, typename enable_if<__is_seed_sequence<_Sseq, shuffle_order_engine>::value && - !is_convertible<_Sseq, _Engine>::value>::type* = 0) + !is_convertible<_Sseq, _Engine>::value>::type* = nullptr) : __e_(__q) {__init();} _LIBCPP_INLINE_VISIBILITY void seed() {__e_.seed(); __init();} Index: libcxx/include/__random/subtract_with_carry_engine.h =================================================================== --- libcxx/include/__random/subtract_with_carry_engine.h +++ libcxx/include/__random/subtract_with_carry_engine.h @@ -104,7 +104,7 @@ template _LIBCPP_INLINE_VISIBILITY explicit subtract_with_carry_engine(_Sseq& __q, - typename enable_if<__is_seed_sequence<_Sseq, subtract_with_carry_engine>::value>::type* = 0) + typename enable_if<__is_seed_sequence<_Sseq, subtract_with_carry_engine>::value>::type* = nullptr) {seed(__q);} _LIBCPP_INLINE_VISIBILITY void seed(result_type __sd = default_seed) Index: libcxx/include/deque =================================================================== --- libcxx/include/deque +++ libcxx/include/deque @@ -264,7 +264,7 @@ template _LIBCPP_HIDE_FROM_ABI __deque_iterator(const __deque_iterator& __it, - typename enable_if::value>::type* = 0) _NOEXCEPT + typename enable_if::value>::type* = nullptr) _NOEXCEPT : __m_iter_(__it.__m_iter_), __ptr_(__it.__ptr_) {} _LIBCPP_HIDE_FROM_ABI reference operator*() const {return *__ptr_;} @@ -586,10 +586,10 @@ template _LIBCPP_HIDE_FROM_ABI deque(_InputIter __f, _InputIter __l, - typename enable_if<__is_cpp17_input_iterator<_InputIter>::value>::type* = 0); + typename enable_if<__is_cpp17_input_iterator<_InputIter>::value>::type* = nullptr); template _LIBCPP_HIDE_FROM_ABI deque(_InputIter __f, _InputIter __l, const allocator_type& __a, - typename enable_if<__is_cpp17_input_iterator<_InputIter>::value>::type* = 0); + typename enable_if<__is_cpp17_input_iterator<_InputIter>::value>::type* = nullptr); _LIBCPP_HIDE_FROM_ABI deque(const deque& __c); _LIBCPP_HIDE_FROM_ABI deque(const deque& __c, const __type_identity_t& __a); @@ -618,10 +618,10 @@ template _LIBCPP_HIDE_FROM_ABI void assign(_InputIter __f, _InputIter __l, typename enable_if<__is_cpp17_input_iterator<_InputIter>::value && - !__is_cpp17_random_access_iterator<_InputIter>::value>::type* = 0); + !__is_cpp17_random_access_iterator<_InputIter>::value>::type* = nullptr); template _LIBCPP_HIDE_FROM_ABI void assign(_RAIter __f, _RAIter __l, - typename enable_if<__is_cpp17_random_access_iterator<_RAIter>::value>::type* = 0); + typename enable_if<__is_cpp17_random_access_iterator<_RAIter>::value>::type* = nullptr); _LIBCPP_HIDE_FROM_ABI void assign(size_type __n, const value_type& __v); _LIBCPP_HIDE_FROM_ABI @@ -633,25 +633,25 @@ _LIBCPP_HIDE_FROM_ABI iterator begin() _NOEXCEPT { __map_pointer __mp = __map_.begin() + __start_ / __block_size; - return iterator(__mp, __map_.empty() ? 0 : *__mp + __start_ % __block_size); + return iterator(__mp, __map_.empty() ? nullptr : *__mp + __start_ % __block_size); } _LIBCPP_HIDE_FROM_ABI const_iterator begin() const _NOEXCEPT { __map_const_pointer __mp = static_cast<__map_const_pointer>(__map_.begin() + __start_ / __block_size); - return const_iterator(__mp, __map_.empty() ? 0 : *__mp + __start_ % __block_size); + return const_iterator(__mp, __map_.empty() ? nullptr : *__mp + __start_ % __block_size); } _LIBCPP_HIDE_FROM_ABI iterator end() _NOEXCEPT { size_type __p = size() + __start_; __map_pointer __mp = __map_.begin() + __p / __block_size; - return iterator(__mp, __map_.empty() ? 0 : *__mp + __p % __block_size); + return iterator(__mp, __map_.empty() ? nullptr : *__mp + __p % __block_size); } _LIBCPP_HIDE_FROM_ABI const_iterator end() const _NOEXCEPT { size_type __p = size() + __start_; __map_const_pointer __mp = static_cast<__map_const_pointer>(__map_.begin() + __p / __block_size); - return const_iterator(__mp, __map_.empty() ? 0 : *__mp + __p % __block_size); + return const_iterator(__mp, __map_.empty() ? nullptr : *__mp + __p % __block_size); } _LIBCPP_HIDE_FROM_ABI @@ -741,13 +741,13 @@ _LIBCPP_HIDE_FROM_ABI iterator insert(const_iterator __p, size_type __n, const value_type& __v); template _LIBCPP_HIDE_FROM_ABI iterator insert(const_iterator __p, _InputIter __f, _InputIter __l, - typename enable_if<__is_exactly_cpp17_input_iterator<_InputIter>::value>::type* = 0); + typename enable_if<__is_exactly_cpp17_input_iterator<_InputIter>::value>::type* = nullptr); template _LIBCPP_HIDE_FROM_ABI iterator insert(const_iterator __p, _ForwardIterator __f, _ForwardIterator __l, - typename enable_if<__is_exactly_cpp17_forward_iterator<_ForwardIterator>::value>::type* = 0); + typename enable_if<__is_exactly_cpp17_forward_iterator<_ForwardIterator>::value>::type* = nullptr); template _LIBCPP_HIDE_FROM_ABI iterator insert(const_iterator __p, _BiIter __f, _BiIter __l, - typename enable_if<__is_cpp17_bidirectional_iterator<_BiIter>::value>::type* = 0); + typename enable_if<__is_cpp17_bidirectional_iterator<_BiIter>::value>::type* = nullptr); _LIBCPP_HIDE_FROM_ABI void pop_front(); _LIBCPP_HIDE_FROM_ABI void pop_back(); @@ -883,10 +883,10 @@ template _LIBCPP_HIDE_FROM_ABI void __append(_InpIter __f, _InpIter __l, - typename enable_if<__is_exactly_cpp17_input_iterator<_InpIter>::value>::type* = 0); + typename enable_if<__is_exactly_cpp17_input_iterator<_InpIter>::value>::type* = nullptr); template _LIBCPP_HIDE_FROM_ABI void __append(_ForIter __f, _ForIter __l, - typename enable_if<__is_cpp17_forward_iterator<_ForIter>::value>::type* = 0); + typename enable_if<__is_cpp17_forward_iterator<_ForIter>::value>::type* = nullptr); _LIBCPP_HIDE_FROM_ABI void __append(size_type __n); _LIBCPP_HIDE_FROM_ABI void __append(size_type __n, const value_type& __v); _LIBCPP_HIDE_FROM_ABI void __erase_to_end(const_iterator __f); Index: libcxx/include/fstream =================================================================== --- libcxx/include/fstream +++ libcxx/include/fstream @@ -380,8 +380,8 @@ __rhs.__cm_ = 0; __rhs.__owns_eb_ = false; __rhs.__owns_ib_ = false; - __rhs.setg(0, 0, 0); - __rhs.setp(0, 0); + __rhs.setg(nullptr, nullptr, nullptr); + __rhs.setp(nullptr, nullptr); } template @@ -718,7 +718,7 @@ if (fclose(__h.release())) __rt = nullptr; __file_ = nullptr; - setbuf(0, 0); + setbuf(nullptr, 0); } return __rt; } Index: libcxx/include/list =================================================================== --- libcxx/include/list +++ libcxx/include/list @@ -881,10 +881,10 @@ template list(_InpIter __f, _InpIter __l, - __enable_if_t<__is_cpp17_input_iterator<_InpIter>::value>* = 0); + __enable_if_t<__is_cpp17_input_iterator<_InpIter>::value>* = nullptr); template list(_InpIter __f, _InpIter __l, const allocator_type& __a, - __enable_if_t<__is_cpp17_input_iterator<_InpIter>::value>* = 0); + __enable_if_t<__is_cpp17_input_iterator<_InpIter>::value>* = nullptr); list(const list& __c); list(const list& __c, const __type_identity_t& __a); @@ -916,7 +916,7 @@ template void assign(_InpIter __f, _InpIter __l, - __enable_if_t<__is_cpp17_input_iterator<_InpIter>::value>* = 0); + __enable_if_t<__is_cpp17_input_iterator<_InpIter>::value>* = nullptr); void assign(size_type __n, const value_type& __x); _LIBCPP_INLINE_VISIBILITY @@ -1033,7 +1033,7 @@ iterator insert(const_iterator __p, size_type __n, const value_type& __x); template iterator insert(const_iterator __p, _InpIter __f, _InpIter __l, - __enable_if_t<__is_cpp17_input_iterator<_InpIter>::value>* = 0); + __enable_if_t<__is_cpp17_input_iterator<_InpIter>::value>* = nullptr); _LIBCPP_INLINE_VISIBILITY void swap(list& __c) Index: libcxx/include/locale =================================================================== --- libcxx/include/locale +++ libcxx/include/locale @@ -3397,7 +3397,7 @@ { __hw.reset((char_type*)malloc(__exn * sizeof(char_type))); __mb = __hw.get(); - if (__mb == 0) + if (__mb == nullptr) __throw_bad_alloc(); } // format @@ -3439,7 +3439,7 @@ { __h.reset((char_type*)malloc(__exn * sizeof(char_type))); __mb = __h.get(); - if (__mb == 0) + if (__mb == nullptr) __throw_bad_alloc(); } // format @@ -3984,7 +3984,7 @@ wbuffer_convert<_Codecvt, _Elem, _Tr>::underflow() { _LIBCPP_SUPPRESS_DEPRECATED_POP - if (__cv_ == 0 || __bufptr_ == 0) + if (__cv_ == 0 || __bufptr_ == nullptr) return traits_type::eof(); bool __initial = __read_mode(); char_type __1buf; @@ -4046,7 +4046,7 @@ else __c = *this->gptr(); if (this->eback() == &__1buf) - this->setg(0, 0, 0); + this->setg(nullptr, nullptr, nullptr); return __c; } @@ -4056,7 +4056,7 @@ wbuffer_convert<_Codecvt, _Elem, _Tr>::pbackfail(int_type __c) { _LIBCPP_SUPPRESS_DEPRECATED_POP - if (__cv_ != 0 && __bufptr_ != 0 && this->eback() < this->gptr()) + if (__cv_ != 0 && __bufptr_ != nullptr && this->eback() < this->gptr()) { if (traits_type::eq_int_type(__c, traits_type::eof())) { @@ -4079,7 +4079,7 @@ wbuffer_convert<_Codecvt, _Elem, _Tr>::overflow(int_type __c) { _LIBCPP_SUPPRESS_DEPRECATED_POP - if (__cv_ == 0 || __bufptr_ == 0) + if (__cv_ == 0 || __bufptr_ == nullptr) return traits_type::eof(); __write_mode(); char_type __1buf; @@ -4143,8 +4143,8 @@ wbuffer_convert<_Codecvt, _Elem, _Tr>::setbuf(char_type* __s, streamsize __n) { _LIBCPP_SUPPRESS_DEPRECATED_POP - this->setg(0, 0, 0); - this->setp(0, 0); + this->setg(nullptr, nullptr, nullptr); + this->setp(nullptr, nullptr); if (__owns_eb_) delete [] __extbuf_; if (__owns_ib_) @@ -4199,7 +4199,7 @@ ios_base::openmode __om) { int __width = __cv_->encoding(); - if (__cv_ == 0 || __bufptr_ == 0 || (__width <= 0 && __off != 0) || sync()) + if (__cv_ == 0 || __bufptr_ == nullptr || (__width <= 0 && __off != 0) || sync()) return pos_type(off_type(-1)); // __width > 0 || __off == 0, now check __way if (__way != ios_base::beg && __way != ios_base::cur && __way != ios_base::end) @@ -4213,7 +4213,7 @@ typename wbuffer_convert<_Codecvt, _Elem, _Tr>::pos_type wbuffer_convert<_Codecvt, _Elem, _Tr>::seekpos(pos_type __sp, ios_base::openmode __wch) { - if (__cv_ == 0 || __bufptr_ == 0 || sync()) + if (__cv_ == 0 || __bufptr_ == nullptr || sync()) return pos_type(off_type(-1)); if (__bufptr_->pubseekpos(__sp, __wch) == pos_type(off_type(-1))) return pos_type(off_type(-1)); @@ -4225,7 +4225,7 @@ wbuffer_convert<_Codecvt, _Elem, _Tr>::sync() { _LIBCPP_SUPPRESS_DEPRECATED_POP - if (__cv_ == 0 || __bufptr_ == 0) + if (__cv_ == 0 || __bufptr_ == nullptr) return 0; if (__cm_ & ios_base::out) { @@ -4287,7 +4287,7 @@ } if (__bufptr_->pubseekoff(-__c, ios_base::cur, __cm_) == pos_type(off_type(-1))) return -1; - this->setg(0, 0, 0); + this->setg(nullptr, nullptr, nullptr); __cm_ = 0; } return 0; @@ -4300,7 +4300,7 @@ { if (!(__cm_ & ios_base::in)) { - this->setp(0, 0); + this->setp(nullptr, nullptr); if (__always_noconv_) this->setg((char_type*)__extbuf_, (char_type*)__extbuf_ + __ebs_, @@ -4319,7 +4319,7 @@ { if (!(__cm_ & ios_base::out)) { - this->setg(0, 0, 0); + this->setg(nullptr, nullptr, nullptr); if (__ebs_ > sizeof(__extbuf_min_)) { if (__always_noconv_) @@ -4329,7 +4329,7 @@ this->setp(__intbuf_, __intbuf_ + (__ibs_ - 1)); } else - this->setp(0, 0); + this->setp(nullptr, nullptr); __cm_ = ios_base::out; } } Index: libcxx/include/queue =================================================================== --- libcxx/include/queue +++ libcxx/include/queue @@ -315,28 +315,28 @@ template _LIBCPP_INLINE_VISIBILITY explicit queue(const _Alloc& __a, - __enable_if_t::value>* = 0) + __enable_if_t::value>* = nullptr) : c(__a) {} template _LIBCPP_INLINE_VISIBILITY queue(const queue& __q, const _Alloc& __a, - __enable_if_t::value>* = 0) + __enable_if_t::value>* = nullptr) : c(__q.c, __a) {} template _LIBCPP_INLINE_VISIBILITY queue(const container_type& __c, const _Alloc& __a, - __enable_if_t::value>* = 0) + __enable_if_t::value>* = nullptr) : c(__c, __a) {} #ifndef _LIBCPP_CXX03_LANG template _LIBCPP_INLINE_VISIBILITY queue(container_type&& __c, const _Alloc& __a, - __enable_if_t::value>* = 0) + __enable_if_t::value>* = nullptr) : c(_VSTD::move(__c), __a) {} template _LIBCPP_INLINE_VISIBILITY queue(queue&& __q, const _Alloc& __a, - __enable_if_t::value>* = 0) + __enable_if_t::value>* = nullptr) : c(_VSTD::move(__q.c), __a) {} #endif // _LIBCPP_CXX03_LANG @@ -560,55 +560,55 @@ template _LIBCPP_INLINE_VISIBILITY explicit priority_queue(const _Alloc& __a, - __enable_if_t::value>* = 0); + __enable_if_t::value>* = nullptr); template _LIBCPP_INLINE_VISIBILITY priority_queue(const value_compare& __comp, const _Alloc& __a, - __enable_if_t::value>* = 0); + __enable_if_t::value>* = nullptr); template _LIBCPP_INLINE_VISIBILITY priority_queue(const value_compare& __comp, const container_type& __c, const _Alloc& __a, - __enable_if_t::value>* = 0); + __enable_if_t::value>* = nullptr); template _LIBCPP_INLINE_VISIBILITY priority_queue(const priority_queue& __q, const _Alloc& __a, - __enable_if_t::value>* = 0); + __enable_if_t::value>* = nullptr); #ifndef _LIBCPP_CXX03_LANG template _LIBCPP_INLINE_VISIBILITY priority_queue(const value_compare& __comp, container_type&& __c, const _Alloc& __a, - __enable_if_t::value>* = 0); + __enable_if_t::value>* = nullptr); template _LIBCPP_INLINE_VISIBILITY priority_queue(priority_queue&& __q, const _Alloc& __a, - __enable_if_t::value>* = 0); + __enable_if_t::value>* = nullptr); #endif // _LIBCPP_CXX03_LANG template ::value> > _LIBCPP_INLINE_VISIBILITY priority_queue(_InputIter __f, _InputIter __l, const _Alloc& __a, - __enable_if_t::value>* = 0); + __enable_if_t::value>* = nullptr); template ::value> > _LIBCPP_INLINE_VISIBILITY priority_queue(_InputIter __f, _InputIter __l, const value_compare& __comp, const _Alloc& __a, - __enable_if_t::value>* = 0); + __enable_if_t::value>* = nullptr); template ::value> > _LIBCPP_INLINE_VISIBILITY priority_queue(_InputIter __f, _InputIter __l, const value_compare& __comp, const container_type& __c, const _Alloc& __a, - __enable_if_t::value>* = 0); + __enable_if_t::value>* = nullptr); #ifndef _LIBCPP_CXX03_LANG template ::value> > _LIBCPP_INLINE_VISIBILITY priority_queue(_InputIter __f, _InputIter __l, const value_compare& __comp, container_type&& __c, const _Alloc& __a, - __enable_if_t::value>* = 0); + __enable_if_t::value>* = nullptr); #endif // _LIBCPP_CXX03_LANG _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY Index: libcxx/include/stack =================================================================== --- libcxx/include/stack +++ libcxx/include/stack @@ -179,28 +179,28 @@ template _LIBCPP_INLINE_VISIBILITY explicit stack(const _Alloc& __a, - __enable_if_t::value>* = 0) + __enable_if_t::value>* = nullptr) : c(__a) {} template _LIBCPP_INLINE_VISIBILITY stack(const container_type& __c, const _Alloc& __a, - __enable_if_t::value>* = 0) + __enable_if_t::value>* = nullptr) : c(__c, __a) {} template _LIBCPP_INLINE_VISIBILITY stack(const stack& __s, const _Alloc& __a, - __enable_if_t::value>* = 0) + __enable_if_t::value>* = nullptr) : c(__s.c, __a) {} #ifndef _LIBCPP_CXX03_LANG template _LIBCPP_INLINE_VISIBILITY stack(container_type&& __c, const _Alloc& __a, - __enable_if_t::value>* = 0) + __enable_if_t::value>* = nullptr) : c(_VSTD::move(__c), __a) {} template _LIBCPP_INLINE_VISIBILITY stack(stack&& __s, const _Alloc& __a, - __enable_if_t::value>* = 0) + __enable_if_t::value>* = nullptr) : c(_VSTD::move(__s.c), __a) {} #endif // _LIBCPP_CXX03_LANG Index: libcxx/include/vector =================================================================== --- libcxx/include/vector +++ libcxx/include/vector @@ -2133,16 +2133,16 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 vector(size_type __n, const value_type& __v, const allocator_type& __a); template _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 vector(_InputIterator __first, _InputIterator __last, - typename enable_if<__is_exactly_cpp17_input_iterator<_InputIterator>::value>::type* = 0); + typename enable_if<__is_exactly_cpp17_input_iterator<_InputIterator>::value>::type* = nullptr); template _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 vector(_InputIterator __first, _InputIterator __last, const allocator_type& __a, - typename enable_if<__is_exactly_cpp17_input_iterator<_InputIterator>::value>::type* = 0); + typename enable_if<__is_exactly_cpp17_input_iterator<_InputIterator>::value>::type* = nullptr); template _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 vector(_ForwardIterator __first, _ForwardIterator __last, - typename enable_if<__is_cpp17_forward_iterator<_ForwardIterator>::value>::type* = 0); + typename enable_if<__is_cpp17_forward_iterator<_ForwardIterator>::value>::type* = nullptr); template _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 vector(_ForwardIterator __first, _ForwardIterator __last, const allocator_type& __a, - typename enable_if<__is_cpp17_forward_iterator<_ForwardIterator>::value>::type* = 0); + typename enable_if<__is_cpp17_forward_iterator<_ForwardIterator>::value>::type* = nullptr); _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 vector(const vector& __v); _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 vector(const vector& __v, const allocator_type& __a); Index: libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/construct.cxx2a.pass.cpp =================================================================== --- libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/construct.cxx2a.pass.cpp +++ libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/construct.cxx2a.pass.cpp @@ -99,7 +99,7 @@ assert(globalMemCounter.checkOutstandingNewEq(1)); assert(A_constructed == 0); - a.construct(ap, 5, (int*)0); + a.construct(ap, 5, (int*)nullptr); assert(globalMemCounter.checkOutstandingNewEq(1)); assert(A_constructed == 1); Index: libcxx/test/libcxx/language.support/cmp/cmp.categories.pre/zero_type.verify.cpp =================================================================== --- libcxx/test/libcxx/language.support/cmp/cmp.categories.pre/zero_type.verify.cpp +++ libcxx/test/libcxx/language.support/cmp/cmp.categories.pre/zero_type.verify.cpp @@ -8,10 +8,6 @@ // UNSUPPORTED: c++03, c++11, c++14, c++17 -// In MSVC mode, there's a slightly different number of errors printed for -// each of these, so it doesn't add up to the exact expected count of 18. -// XFAIL: msvc - // // Ensure we reject all cases where an argument other than a literal 0 is used @@ -23,9 +19,7 @@ void(v op 0L); \ void(0L op v); \ void(v op nullptr); \ - void(nullptr op v); \ - void(v op(1 - 1)); \ - void((1 - 1) op v) + void(nullptr op v) #define TEST_PASS(v, op) \ void(v op 0); \ @@ -33,13 +27,13 @@ template void test_category(T v) { - TEST_FAIL(v, ==); // expected-error 18 {{}} - TEST_FAIL(v, !=); // expected-error 18 {{}} - TEST_FAIL(v, <); // expected-error 18 {{}} - TEST_FAIL(v, <=); // expected-error 18 {{}} - TEST_FAIL(v, >); // expected-error 18 {{}} - TEST_FAIL(v, >=); // expected-error 18 {{}} - TEST_FAIL(v, <=>); // expected-error 18 {{}} + TEST_FAIL(v, ==); // expected-error 12 {{}} + TEST_FAIL(v, !=); // expected-error 12 {{}} + TEST_FAIL(v, <); // expected-error 12 {{}} + TEST_FAIL(v, <=); // expected-error 12 {{}} + TEST_FAIL(v, >); // expected-error 12 {{}} + TEST_FAIL(v, >=); // expected-error 12 {{}} + TEST_FAIL(v, <=>); // expected-error 12 {{}} TEST_PASS(v, ==); TEST_PASS(v, !=); Index: libcxx/test/libcxx/strings/string.view/assert.ctor.pointer.pass.cpp =================================================================== --- libcxx/test/libcxx/strings/string.view/assert.ctor.pointer.pass.cpp +++ libcxx/test/libcxx/strings/string.view/assert.ctor.pointer.pass.cpp @@ -11,7 +11,7 @@ // UNSUPPORTED: c++03 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}} -// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1 +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1 -Wno-zero-as-null-pointer-constant // Construct a string_view from a null pointer // constexpr basic_string_view( const CharT* s ); Index: libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/assignment.compile.fail.cpp =================================================================== --- libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/assignment.compile.fail.cpp +++ libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/assignment.compile.fail.cpp @@ -31,7 +31,7 @@ std::auto_ptr& apr = ap2 = ap1; assert(&apr == &ap2); assert(A::count == 1); - assert(ap1.get() == 0); + assert(ap1.get() == nullptr); assert(ap2.get() == p1); } assert(A::count == 0); Index: libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/assignment.pass.cpp =================================================================== --- libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/assignment.pass.cpp +++ libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/assignment.pass.cpp @@ -35,7 +35,7 @@ std::auto_ptr& apr = ap2 = ap1; assert(&apr == &ap2); assert(A::count == 1); - assert(ap1.get() == 0); + assert(ap1.get() == nullptr); assert(ap2.get() == p1); } assert(A::count == 0); Index: libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert.compile.fail.cpp =================================================================== --- libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert.compile.fail.cpp +++ libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert.compile.fail.cpp @@ -24,7 +24,7 @@ B* p = new B(1); const std::auto_ptr ap1(p); std::auto_ptr ap2(ap1); - assert(ap1.get() == 0); + assert(ap1.get() == nullptr); assert(ap2.get() == p); assert(A::count == 1); assert(B::count == 1); Index: libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert.pass.cpp =================================================================== --- libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert.pass.cpp +++ libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert.pass.cpp @@ -28,7 +28,7 @@ B* p = new B(1); std::auto_ptr ap1(p); std::auto_ptr ap2(ap1); - assert(ap1.get() == 0); + assert(ap1.get() == nullptr); assert(ap2.get() == p); assert(A::count == 1); assert(B::count == 1); Index: libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert_assignment.compile.fail.cpp =================================================================== --- libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert_assignment.compile.fail.cpp +++ libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert_assignment.compile.fail.cpp @@ -35,7 +35,7 @@ assert(&apr == &ap2); assert(A::count == 1); assert(B::count == 1); - assert(ap1.get() == 0); + assert(ap1.get() == nullptr); assert(ap2.get() == p1); } assert(A::count == 0); Index: libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert_assignment.pass.cpp =================================================================== --- libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert_assignment.pass.cpp +++ libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert_assignment.pass.cpp @@ -37,7 +37,7 @@ assert(&apr == &ap2); assert(A::count == 1); assert(B::count == 1); - assert(ap1.get() == 0); + assert(ap1.get() == nullptr); assert(ap2.get() == p1); } assert(A::count == 0); Index: libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/copy.compile.fail.cpp =================================================================== --- libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/copy.compile.fail.cpp +++ libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/copy.compile.fail.cpp @@ -26,7 +26,7 @@ A* p = new A(1); const std::auto_ptr ap1(p); std::auto_ptr ap2(ap1); - assert(ap1.get() == 0); + assert(ap1.get() == nullptr); assert(ap2.get() == p); assert(A::count == 1); } Index: libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/copy.pass.cpp =================================================================== --- libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/copy.pass.cpp +++ libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/copy.pass.cpp @@ -28,7 +28,7 @@ A* p = new A(1); std::auto_ptr ap1(p); std::auto_ptr ap2(ap1); - assert(ap1.get() == 0); + assert(ap1.get() == nullptr); assert(ap2.get() == p); assert(A::count == 1); } Index: libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/explicit.compile.fail.cpp =================================================================== --- libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/explicit.compile.fail.cpp +++ libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/explicit.compile.fail.cpp @@ -31,7 +31,7 @@ assert(A::count == 0); { std::auto_ptr ap; - assert(ap.get() == 0); + assert(ap.get() == nullptr); } } Index: libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/pointer.pass.cpp =================================================================== --- libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/pointer.pass.cpp +++ libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/pointer.pass.cpp @@ -33,7 +33,7 @@ assert(A::count == 0); { std::auto_ptr ap; - assert(ap.get() == 0); + assert(ap.get() == nullptr); } } Index: libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/assign_from_auto_ptr_ref.pass.cpp =================================================================== --- libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/assign_from_auto_ptr_ref.pass.cpp +++ libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/assign_from_auto_ptr_ref.pass.cpp @@ -32,7 +32,7 @@ ap2 = apr; assert(A::count == 1); assert(ap2.get() == p1); - assert(ap1.get() == 0); + assert(ap1.get() == nullptr); } assert(A::count == 0); } Index: libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_from_auto_ptr_ref.pass.cpp =================================================================== --- libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_from_auto_ptr_ref.pass.cpp +++ libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_from_auto_ptr_ref.pass.cpp @@ -30,7 +30,7 @@ std::auto_ptr_ref apr = ap1; std::auto_ptr ap2(apr); assert(ap2.get() == p1); - assert(ap1.get() == 0); + assert(ap1.get() == nullptr); } assert(A::count == 0); assert(B::count == 0); Index: libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/release.pass.cpp =================================================================== --- libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/release.pass.cpp +++ libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/release.pass.cpp @@ -29,7 +29,7 @@ std::auto_ptr ap(p); A* p2 = ap.release(); assert(p2 == p); - assert(ap.get() == 0); + assert(ap.get() == nullptr); delete p; } assert(A::count == 0); Index: libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/reset.pass.cpp =================================================================== --- libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/reset.pass.cpp +++ libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/reset.pass.cpp @@ -28,7 +28,7 @@ A* p = new A(1); std::auto_ptr ap(p); ap.reset(); - assert(ap.get() == 0); + assert(ap.get() == nullptr); assert(A::count == 0); } assert(A::count == 0); Index: libcxx/test/std/depr/depr.c.headers/inttypes_h.compile.pass.cpp =================================================================== --- libcxx/test/std/depr/depr.c.headers/inttypes_h.compile.pass.cpp +++ libcxx/test/std/depr/depr.c.headers/inttypes_h.compile.pass.cpp @@ -913,10 +913,10 @@ intmax_t i = 0; (void)i; ASSERT_SAME_TYPE(intmax_t, decltype(imaxabs(i))); ASSERT_SAME_TYPE(imaxdiv_t, decltype(imaxdiv(i, i))); - ASSERT_SAME_TYPE(intmax_t, decltype(strtoimax("", (char**)0, 0))); - ASSERT_SAME_TYPE(uintmax_t, decltype(strtoumax("", (char**)0, 0))); + ASSERT_SAME_TYPE(intmax_t, decltype(strtoimax("", (char**)nullptr, 0))); + ASSERT_SAME_TYPE(uintmax_t, decltype(strtoumax("", (char**)nullptr, 0))); #ifndef TEST_HAS_NO_WIDE_CHARACTERS - ASSERT_SAME_TYPE(intmax_t, decltype(wcstoimax(L"", (wchar_t**)0, 0))); - ASSERT_SAME_TYPE(uintmax_t, decltype(wcstoumax(L"", (wchar_t**)0, 0))); + ASSERT_SAME_TYPE(intmax_t, decltype(wcstoimax(L"", (wchar_t**)nullptr, 0))); + ASSERT_SAME_TYPE(uintmax_t, decltype(wcstoumax(L"", (wchar_t**)nullptr, 0))); #endif } Index: libcxx/test/std/depr/depr.c.headers/math_h.pass.cpp =================================================================== --- libcxx/test/std/depr/depr.c.headers/math_h.pass.cpp +++ libcxx/test/std/depr/depr.c.headers/math_h.pass.cpp @@ -238,12 +238,12 @@ } void test_modf() { - ASSERT_SAME_TYPE(decltype(modf((float)0, (float*)0)), float); - ASSERT_SAME_TYPE(decltype(modf((double)0, (double*)0)), double); - ASSERT_SAME_TYPE(decltype(modf((long double)0, (long double*)0)), long double); - ASSERT_SAME_TYPE(decltype(modff(0, (float*)0)), float); - ASSERT_SAME_TYPE(decltype(modfl(0, (long double*)0)), long double); - ASSERT_SAME_TYPE(decltype(modf(Ambiguous(), (Ambiguous*)0)), Ambiguous); + ASSERT_SAME_TYPE(decltype(modf((float)0, (float*)nullptr)), float); + ASSERT_SAME_TYPE(decltype(modf((double)0, (double*)nullptr)), double); + ASSERT_SAME_TYPE(decltype(modf((long double)0, (long double*)nullptr)), long double); + ASSERT_SAME_TYPE(decltype(modff(0, (float*)nullptr)), float); + ASSERT_SAME_TYPE(decltype(modfl(0, (long double*)nullptr)), long double); + ASSERT_SAME_TYPE(decltype(modf(Ambiguous(), (Ambiguous*)nullptr)), Ambiguous); double i; assert(modf(1., &i) == 0); } Index: libcxx/test/std/depr/depr.c.headers/stdio_h.compile.pass.cpp =================================================================== --- libcxx/test/std/depr/depr.c.headers/stdio_h.compile.pass.cpp +++ libcxx/test/std/depr/depr.c.headers/stdio_h.compile.pass.cpp @@ -103,7 +103,7 @@ FILE* fp = 0; fpos_t fpos = fpos_t(); size_t s = 0; -char* cp = 0; +char* cp = nullptr; char arr[] = {'a', 'b'}; va_list va; ASSERT_SAME_TYPE(int, decltype(remove(""))); @@ -159,7 +159,7 @@ ASSERT_SAME_TYPE(int, decltype(putchar(0))); ASSERT_SAME_TYPE(int, decltype(puts(""))); ASSERT_SAME_TYPE(int, decltype(ungetc(0,fp))); -ASSERT_SAME_TYPE(size_t, decltype(fread((void*)0,0,0,fp))); +ASSERT_SAME_TYPE(size_t, decltype(fread((void*)nullptr,0,0,fp))); ASSERT_SAME_TYPE(size_t, decltype(fwrite((const void*)arr,1,0,fp))); #ifndef TEST_HAS_NO_FGETPOS_FSETPOS ASSERT_SAME_TYPE(int, decltype(fgetpos(fp, &fpos))); Index: libcxx/test/std/depr/depr.c.headers/stdlib_h.pass.cpp =================================================================== --- libcxx/test/std/depr/depr.c.headers/stdlib_h.pass.cpp +++ libcxx/test/std/depr/depr.c.headers/stdlib_h.pass.cpp @@ -115,11 +115,11 @@ // aligned_alloc tested in stdlib_h.aligned_alloc.compile.pass.cpp - void* pv = 0; - void (*handler)() = 0; - int (*comp)(void const*, void const*) = 0; + void* pv = nullptr; + void (*handler)() = nullptr; + int (*comp)(void const*, void const*) = nullptr; ASSERT_SAME_TYPE(void*, decltype(calloc(0,0))); - ASSERT_SAME_TYPE(void, decltype(free(0))); + ASSERT_SAME_TYPE(void, decltype(free(nullptr))); ASSERT_SAME_TYPE(void*, decltype(malloc(0))); ASSERT_SAME_TYPE(void*, decltype(realloc(0,0))); ASSERT_SAME_TYPE(void, decltype(abort())); Index: libcxx/test/std/depr/depr.c.headers/string_h.pass.cpp =================================================================== --- libcxx/test/std/depr/depr.c.headers/string_h.pass.cpp +++ libcxx/test/std/depr/depr.c.headers/string_h.pass.cpp @@ -21,10 +21,10 @@ // Functions we get directly from the C library (just check the signature) { size_t s = 0; - void* vp = 0; - const void* vpc = 0; - char* cp = 0; - const char* cpc = 0; + void* vp = nullptr; + const void* vpc = nullptr; + char* cp = nullptr; + const char* cpc = nullptr; ASSERT_SAME_TYPE(void*, decltype(memcpy(vp, vpc, s))); ASSERT_SAME_TYPE(void*, decltype(memmove(vp, vpc, s))); ASSERT_SAME_TYPE(char*, decltype(strcpy(cp, cpc))); Index: libcxx/test/std/depr/depr.c.headers/uchar_h.compile.pass.cpp =================================================================== --- libcxx/test/std/depr/depr.c.headers/uchar_h.compile.pass.cpp +++ libcxx/test/std/depr/depr.c.headers/uchar_h.compile.pass.cpp @@ -24,12 +24,12 @@ // __STDC_UTF_32__ may or may not be defined by the C standard library #if !defined(TEST_HAS_NO_C8RTOMB_MBRTOC8) -ASSERT_SAME_TYPE(size_t, decltype(mbrtoc8((char8_t*)0, (const char*)0, (size_t)0, (mbstate_t*)0))); -ASSERT_SAME_TYPE(size_t, decltype(c8rtomb((char*)0, (char8_t)0, (mbstate_t*)0))); +ASSERT_SAME_TYPE(size_t, decltype(mbrtoc8((char8_t*)nullptr, (const char*)nullptr, (size_t)0, (mbstate_t*)nullptr))); +ASSERT_SAME_TYPE(size_t, decltype(c8rtomb((char*)nullptr, (char8_t)0, (mbstate_t*)nullptr))); #endif -ASSERT_SAME_TYPE(size_t, decltype(mbrtoc16((char16_t*)0, (const char*)0, (size_t)0, (mbstate_t*)0))); -ASSERT_SAME_TYPE(size_t, decltype(c16rtomb((char*)0, (char16_t)0, (mbstate_t*)0))); +ASSERT_SAME_TYPE(size_t, decltype(mbrtoc16((char16_t*)nullptr, (const char*)nullptr, (size_t)0, (mbstate_t*)nullptr))); +ASSERT_SAME_TYPE(size_t, decltype(c16rtomb((char*)nullptr, (char16_t)0, (mbstate_t*)nullptr))); -ASSERT_SAME_TYPE(size_t, decltype(mbrtoc32((char32_t*)0, (const char*)0, (size_t)0, (mbstate_t*)0))); -ASSERT_SAME_TYPE(size_t, decltype(c16rtomb((char*)0, (char32_t)0, (mbstate_t*)0))); +ASSERT_SAME_TYPE(size_t, decltype(mbrtoc32((char32_t*)nullptr, (const char*)nullptr, (size_t)0, (mbstate_t*)nullptr))); +ASSERT_SAME_TYPE(size_t, decltype(c16rtomb((char*)nullptr, (char32_t)0, (mbstate_t*)nullptr))); Index: libcxx/test/std/depr/depr.c.headers/wchar_h.compile.pass.cpp =================================================================== --- libcxx/test/std/depr/depr.c.headers/wchar_h.compile.pass.cpp +++ libcxx/test/std/depr/depr.c.headers/wchar_h.compile.pass.cpp @@ -104,8 +104,8 @@ ASSERT_SAME_TYPE(size_t, decltype(mbrlen("", s, &mb))); ASSERT_SAME_TYPE(size_t, decltype(mbrtowc(ws, "", s, &mb))); ASSERT_SAME_TYPE(size_t, decltype(wcrtomb(ns, L' ', &mb))); -ASSERT_SAME_TYPE(size_t, decltype(mbsrtowcs(ws, (const char**)0, s, &mb))); -ASSERT_SAME_TYPE(size_t, decltype(wcsrtombs(ns, (const wchar_t**)0, s, &mb))); +ASSERT_SAME_TYPE(size_t, decltype(mbsrtowcs(ws, (const char**)nullptr, s, &mb))); +ASSERT_SAME_TYPE(size_t, decltype(wcsrtombs(ns, (const wchar_t**)nullptr, s, &mb))); ASSERT_SAME_TYPE(wint_t, decltype(getwchar())); ASSERT_SAME_TYPE(int, decltype(vwscanf(L"", va))); ASSERT_SAME_TYPE(int, decltype(wscanf(L""))); Index: libcxx/test/std/input.output/file.streams/c.files/cinttypes.pass.cpp =================================================================== --- libcxx/test/std/input.output/file.streams/c.files/cinttypes.pass.cpp +++ libcxx/test/std/input.output/file.streams/c.files/cinttypes.pass.cpp @@ -925,11 +925,11 @@ ((void)i); // Prevent unused warning static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), ""); #ifndef TEST_HAS_NO_WIDE_CHARACTERS - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), ""); #endif return 0; Index: libcxx/test/std/input.output/file.streams/c.files/cstdio.pass.cpp =================================================================== --- libcxx/test/std/input.output/file.streams/c.files/cstdio.pass.cpp +++ libcxx/test/std/input.output/file.streams/c.files/cstdio.pass.cpp @@ -83,12 +83,12 @@ int main(int, char**) { - std::FILE* fp = 0; + std::FILE* fp = nullptr; std::fpos_t fpos = std::fpos_t(); std::size_t s = 0; - char* cp = 0; + char* cp = nullptr; std::va_list va; - void const* vp = 0; + void const* vp = nullptr; ((void)fp); // Prevent unused warning ((void)fpos); // Prevent unused warning ((void)s); // Prevent unused warning @@ -124,7 +124,7 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); #ifndef TEST_HAS_NO_FGETPOS_FSETPOS static_assert((std::is_same::value), ""); Index: libcxx/test/std/input.output/file.streams/fstreams/filebuf.assign/nonmember_swap_min.pass.cpp =================================================================== --- libcxx/test/std/input.output/file.streams/fstreams/filebuf.assign/nonmember_swap_min.pass.cpp +++ libcxx/test/std/input.output/file.streams/fstreams/filebuf.assign/nonmember_swap_min.pass.cpp @@ -37,12 +37,12 @@ std::filebuf f1; assert(f1.open(tmpA, std::ios_base::in) != 0); assert(f1.is_open()); - f1.pubsetbuf(0, 0); + f1.pubsetbuf(nullptr, 0); std::filebuf f2; assert(f2.open(tmpB, std::ios_base::in) != 0); assert(f2.is_open()); - f2.pubsetbuf(0, 0); + f2.pubsetbuf(nullptr, 0); assert(f1.sgetc() == 'A'); assert(f2.sgetc() == 'B'); Index: libcxx/test/std/input.output/file.streams/fstreams/filebuf.virtuals/overflow.pass.cpp =================================================================== --- libcxx/test/std/input.output/file.streams/fstreams/filebuf.virtuals/overflow.pass.cpp +++ libcxx/test/std/input.output/file.streams/fstreams/filebuf.virtuals/overflow.pass.cpp @@ -60,7 +60,7 @@ std::remove("overflow.dat"); { test_buf f; - f.pubsetbuf(0, 0); + f.pubsetbuf(nullptr, 0); assert(f.open("overflow.dat", std::ios_base::out) != 0); assert(f.is_open()); assert(f.pbase() == 0); @@ -101,7 +101,7 @@ std::remove("overflow.dat"); { test_buf f; - f.pubsetbuf(0, 0); + f.pubsetbuf(nullptr, 0); assert(f.open("overflow.dat", std::ios_base::out) != 0); assert(f.is_open()); assert(f.pbase() == 0); Index: libcxx/test/std/input.output/iostream.format/input.streams/iostreamclass/iostream.assign/member_swap.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostream.format/input.streams/iostreamclass/iostream.assign/member_swap.pass.cpp +++ libcxx/test/std/input.output/iostream.format/input.streams/iostreamclass/iostream.assign/member_swap.pass.cpp @@ -44,7 +44,7 @@ test_iostream is2(&sb2); is1.swap(is2); assert(is1.rdbuf() == &sb1); - assert(is1.tie() == 0); + assert(is1.tie() == nullptr); assert(is1.fill() == ' '); assert(is1.rdstate() == is1.goodbit); assert(is1.exceptions() == is1.goodbit); @@ -52,7 +52,7 @@ assert(is1.precision() == 6); assert(is1.getloc().name() == "C"); assert(is2.rdbuf() == &sb2); - assert(is2.tie() == 0); + assert(is2.tie() == nullptr); assert(is2.fill() == ' '); assert(is2.rdstate() == is2.goodbit); assert(is2.exceptions() == is2.goodbit); @@ -68,7 +68,7 @@ test_iostream is2(&sb2); is1.swap(is2); assert(is1.rdbuf() == &sb1); - assert(is1.tie() == 0); + assert(is1.tie() == nullptr); assert(is1.fill() == ' '); assert(is1.rdstate() == is1.goodbit); assert(is1.exceptions() == is1.goodbit); @@ -76,7 +76,7 @@ assert(is1.precision() == 6); assert(is1.getloc().name() == "C"); assert(is2.rdbuf() == &sb2); - assert(is2.tie() == 0); + assert(is2.tie() == nullptr); assert(is2.fill() == ' '); assert(is2.rdstate() == is2.goodbit); assert(is2.exceptions() == is2.goodbit); Index: libcxx/test/std/input.output/iostream.format/input.streams/iostreamclass/iostream.assign/move_assign.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostream.format/input.streams/iostreamclass/iostream.assign/move_assign.pass.cpp +++ libcxx/test/std/input.output/iostream.format/input.streams/iostreamclass/iostream.assign/move_assign.pass.cpp @@ -47,7 +47,7 @@ test_iostream is2(&sb2); is2 = (std::move(is1)); assert(is1.rdbuf() == &sb1); - assert(is1.tie() == 0); + assert(is1.tie() == nullptr); assert(is1.fill() == ' '); assert(is1.rdstate() == is1.goodbit); assert(is1.exceptions() == is1.goodbit); @@ -55,7 +55,7 @@ assert(is1.precision() == 6); assert(is1.getloc().name() == "C"); assert(is2.rdbuf() == &sb2); - assert(is2.tie() == 0); + assert(is2.tie() == nullptr); assert(is2.fill() == ' '); assert(is2.rdstate() == is2.goodbit); assert(is2.exceptions() == is2.goodbit); @@ -71,7 +71,7 @@ test_iostream is2(&sb2); is2 = (std::move(is1)); assert(is1.rdbuf() == &sb1); - assert(is1.tie() == 0); + assert(is1.tie() == nullptr); assert(is1.fill() == ' '); assert(is1.rdstate() == is1.goodbit); assert(is1.exceptions() == is1.goodbit); @@ -79,7 +79,7 @@ assert(is1.precision() == 6); assert(is1.getloc().name() == "C"); assert(is2.rdbuf() == &sb2); - assert(is2.tie() == 0); + assert(is2.tie() == nullptr); assert(is2.fill() == ' '); assert(is2.rdstate() == is2.goodbit); assert(is2.exceptions() == is2.goodbit); Index: libcxx/test/std/input.output/iostream.format/input.streams/iostreamclass/iostream.cons/move.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostream.format/input.streams/iostreamclass/iostream.cons/move.pass.cpp +++ libcxx/test/std/input.output/iostream.format/input.streams/iostreamclass/iostream.cons/move.pass.cpp @@ -47,8 +47,8 @@ assert(is1.rdbuf() == &sb); assert(is1.gcount() == 0); assert(is.gcount() == 0); - assert(is.rdbuf() == 0); - assert(is.tie() == 0); + assert(is.rdbuf() == nullptr); + assert(is.tie() == nullptr); assert(is.fill() == ' '); assert(is.rdstate() == is.goodbit); assert(is.exceptions() == is.goodbit); @@ -64,8 +64,8 @@ assert(is1.gcount() == 0); assert(is.gcount() == 0); assert(is1.rdbuf() == &sb); - assert(is.rdbuf() == 0); - assert(is.tie() == 0); + assert(is.rdbuf() == nullptr); + assert(is.tie() == nullptr); assert(is.fill() == L' '); assert(is.rdstate() == is.goodbit); assert(is.exceptions() == is.goodbit); Index: libcxx/test/std/input.output/iostream.format/input.streams/iostreamclass/iostream.cons/streambuf.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostream.format/input.streams/iostreamclass/iostream.cons/streambuf.pass.cpp +++ libcxx/test/std/input.output/iostream.format/input.streams/iostreamclass/iostream.cons/streambuf.pass.cpp @@ -31,7 +31,7 @@ testbuf sb; std::basic_iostream is(&sb); assert(is.rdbuf() == &sb); - assert(is.tie() == 0); + assert(is.tie() == nullptr); assert(is.fill() == ' '); assert(is.rdstate() == is.goodbit); assert(is.exceptions() == is.goodbit); @@ -45,7 +45,7 @@ testbuf sb; std::basic_iostream is(&sb); assert(is.rdbuf() == &sb); - assert(is.tie() == 0); + assert(is.tie() == nullptr); assert(is.fill() == L' '); assert(is.rdstate() == is.goodbit); assert(is.exceptions() == is.goodbit); Index: libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/bool.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/bool.pass.cpp +++ libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/bool.pass.cpp @@ -46,7 +46,7 @@ int main(int, char**) { { - std::istream is((std::streambuf*)0); + std::istream is((std::streambuf*)nullptr); bool n = 0; is >> n; assert(is.fail()); Index: libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/double.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/double.pass.cpp +++ libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/double.pass.cpp @@ -46,7 +46,7 @@ int main(int, char**) { { - std::istream is((std::streambuf*)0); + std::istream is((std::streambuf*)nullptr); double n = 0; is >> n; assert(is.fail()); Index: libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/float.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/float.pass.cpp +++ libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/float.pass.cpp @@ -46,7 +46,7 @@ int main(int, char**) { { - std::istream is((std::streambuf*)0); + std::istream is((std::streambuf*)nullptr); float n = 0; is >> n; assert(is.fail()); Index: libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/int.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/int.pass.cpp +++ libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/int.pass.cpp @@ -47,7 +47,7 @@ int main(int, char**) { { - std::istream is((std::streambuf*)0); + std::istream is((std::streambuf*)nullptr); int n = 0; is >> n; assert(is.fail()); Index: libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/long.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/long.pass.cpp +++ libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/long.pass.cpp @@ -46,7 +46,7 @@ int main(int, char**) { { - std::istream is((std::streambuf*)0); + std::istream is((std::streambuf*)nullptr); long n = 0; is >> n; assert(is.fail()); Index: libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/long_double.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/long_double.pass.cpp +++ libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/long_double.pass.cpp @@ -46,7 +46,7 @@ int main(int, char**) { { - std::istream is((std::streambuf*)0); + std::istream is((std::streambuf*)nullptr); long double n = 0; is >> n; assert(is.fail()); Index: libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/long_long.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/long_long.pass.cpp +++ libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/long_long.pass.cpp @@ -46,7 +46,7 @@ int main(int, char**) { { - std::istream is((std::streambuf*)0); + std::istream is((std::streambuf*)nullptr); long long n = 0; is >> n; assert(is.fail()); Index: libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/pointer.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/pointer.pass.cpp +++ libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/pointer.pass.cpp @@ -46,8 +46,8 @@ int main(int, char**) { { - std::istream is((std::streambuf*)0); - void* n = 0; + std::istream is((std::streambuf*)nullptr); + void* n = nullptr; is >> n; assert(is.fail()); } Index: libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/short.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/short.pass.cpp +++ libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/short.pass.cpp @@ -47,7 +47,7 @@ int main(int, char**) { { - std::istream is((std::streambuf*)0); + std::istream is((std::streambuf*)nullptr); short n = 0; is >> n; assert(is.fail()); Index: libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/unsigned_int.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/unsigned_int.pass.cpp +++ libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/unsigned_int.pass.cpp @@ -46,7 +46,7 @@ int main(int, char**) { { - std::istream is((std::streambuf*)0); + std::istream is((std::streambuf*)nullptr); unsigned int n = 0; is >> n; assert(is.fail()); Index: libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/unsigned_long.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/unsigned_long.pass.cpp +++ libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/unsigned_long.pass.cpp @@ -46,7 +46,7 @@ int main(int, char**) { { - std::istream is((std::streambuf*)0); + std::istream is((std::streambuf*)nullptr); unsigned long n = 0; is >> n; assert(is.fail()); Index: libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/unsigned_long_long.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/unsigned_long_long.pass.cpp +++ libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/unsigned_long_long.pass.cpp @@ -46,7 +46,7 @@ int main(int, char**) { { - std::istream is((std::streambuf*)0); + std::istream is((std::streambuf*)nullptr); unsigned long long n = 0; is >> n; assert(is.fail()); Index: libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/unsigned_short.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/unsigned_short.pass.cpp +++ libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/unsigned_short.pass.cpp @@ -46,7 +46,7 @@ int main(int, char**) { { - std::istream is((std::streambuf*)0); + std::istream is((std::streambuf*)nullptr); unsigned short n = 0; is >> n; assert(is.fail()); Index: libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/basic_ios.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/basic_ios.pass.cpp +++ libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/basic_ios.pass.cpp @@ -32,7 +32,7 @@ int main(int, char**) { { - std::istream is((std::streambuf*)0); + std::istream is((std::streambuf*)nullptr); is >> f; assert(f_called == 1); } Index: libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/ios_base.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/ios_base.pass.cpp +++ libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/ios_base.pass.cpp @@ -30,7 +30,7 @@ int main(int, char**) { { - std::istream is((std::streambuf*)0); + std::istream is((std::streambuf*)nullptr); is >> f; assert(f_called == 1); } Index: libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/istream.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/istream.pass.cpp +++ libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/istream.pass.cpp @@ -32,7 +32,7 @@ int main(int, char**) { { - std::istream is((std::streambuf*)0); + std::istream is((std::streambuf*)nullptr); is >> f; assert(f_called == 1); } Index: libcxx/test/std/input.output/iostream.format/input.streams/istream/istream.assign/member_swap.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostream.format/input.streams/istream/istream.assign/member_swap.pass.cpp +++ libcxx/test/std/input.output/iostream.format/input.streams/istream/istream.assign/member_swap.pass.cpp @@ -44,7 +44,7 @@ test_istream is2(&sb2); is1.swap(is2); assert(is1.rdbuf() == &sb1); - assert(is1.tie() == 0); + assert(is1.tie() == nullptr); assert(is1.fill() == ' '); assert(is1.rdstate() == is1.goodbit); assert(is1.exceptions() == is1.goodbit); @@ -52,7 +52,7 @@ assert(is1.precision() == 6); assert(is1.getloc().name() == "C"); assert(is2.rdbuf() == &sb2); - assert(is2.tie() == 0); + assert(is2.tie() == nullptr); assert(is2.fill() == ' '); assert(is2.rdstate() == is2.goodbit); assert(is2.exceptions() == is2.goodbit); @@ -68,7 +68,7 @@ test_istream is2(&sb2); is1.swap(is2); assert(is1.rdbuf() == &sb1); - assert(is1.tie() == 0); + assert(is1.tie() == nullptr); assert(is1.fill() == ' '); assert(is1.rdstate() == is1.goodbit); assert(is1.exceptions() == is1.goodbit); @@ -76,7 +76,7 @@ assert(is1.precision() == 6); assert(is1.getloc().name() == "C"); assert(is2.rdbuf() == &sb2); - assert(is2.tie() == 0); + assert(is2.tie() == nullptr); assert(is2.fill() == ' '); assert(is2.rdstate() == is2.goodbit); assert(is2.exceptions() == is2.goodbit); Index: libcxx/test/std/input.output/iostream.format/input.streams/istream/istream.assign/move_assign.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostream.format/input.streams/istream/istream.assign/move_assign.pass.cpp +++ libcxx/test/std/input.output/iostream.format/input.streams/istream/istream.assign/move_assign.pass.cpp @@ -47,7 +47,7 @@ test_istream is2(&sb2); is2 = (std::move(is1)); assert(is1.rdbuf() == &sb1); - assert(is1.tie() == 0); + assert(is1.tie() == nullptr); assert(is1.fill() == ' '); assert(is1.rdstate() == is1.goodbit); assert(is1.exceptions() == is1.goodbit); @@ -55,7 +55,7 @@ assert(is1.precision() == 6); assert(is1.getloc().name() == "C"); assert(is2.rdbuf() == &sb2); - assert(is2.tie() == 0); + assert(is2.tie() == nullptr); assert(is2.fill() == ' '); assert(is2.rdstate() == is2.goodbit); assert(is2.exceptions() == is2.goodbit); @@ -71,7 +71,7 @@ test_istream is2(&sb2); is2 = (std::move(is1)); assert(is1.rdbuf() == &sb1); - assert(is1.tie() == 0); + assert(is1.tie() == nullptr); assert(is1.fill() == ' '); assert(is1.rdstate() == is1.goodbit); assert(is1.exceptions() == is1.goodbit); @@ -79,7 +79,7 @@ assert(is1.precision() == 6); assert(is1.getloc().name() == "C"); assert(is2.rdbuf() == &sb2); - assert(is2.tie() == 0); + assert(is2.tie() == nullptr); assert(is2.fill() == ' '); assert(is2.rdstate() == is2.goodbit); assert(is2.exceptions() == is2.goodbit); Index: libcxx/test/std/input.output/iostream.format/input.streams/istream/istream.cons/move.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostream.format/input.streams/istream/istream.cons/move.pass.cpp +++ libcxx/test/std/input.output/iostream.format/input.streams/istream/istream.cons/move.pass.cpp @@ -45,8 +45,8 @@ assert(is1.rdbuf() == &sb); assert(is1.gcount() == 0); assert(is.gcount() == 0); - assert(is.rdbuf() == 0); - assert(is.tie() == 0); + assert(is.rdbuf() == nullptr); + assert(is.tie() == nullptr); assert(is.fill() == ' '); assert(is.rdstate() == is.goodbit); assert(is.exceptions() == is.goodbit); @@ -62,8 +62,8 @@ assert(is1.gcount() == 0); assert(is.gcount() == 0); assert(is1.rdbuf() == &sb); - assert(is.rdbuf() == 0); - assert(is.tie() == 0); + assert(is.rdbuf() == nullptr); + assert(is.tie() == nullptr); assert(is.fill() == L' '); assert(is.rdstate() == is.goodbit); assert(is.exceptions() == is.goodbit); Index: libcxx/test/std/input.output/iostream.format/input.streams/istream/istream.cons/streambuf.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostream.format/input.streams/istream/istream.cons/streambuf.pass.cpp +++ libcxx/test/std/input.output/iostream.format/input.streams/istream/istream.cons/streambuf.pass.cpp @@ -31,7 +31,7 @@ testbuf sb; std::basic_istream is(&sb); assert(is.rdbuf() == &sb); - assert(is.tie() == 0); + assert(is.tie() == nullptr); assert(is.fill() == ' '); assert(is.rdstate() == is.goodbit); assert(is.exceptions() == is.goodbit); @@ -45,7 +45,7 @@ testbuf sb; std::basic_istream is(&sb); assert(is.rdbuf() == &sb); - assert(is.tie() == 0); + assert(is.tie() == nullptr); assert(is.fill() == L' '); assert(is.rdstate() == is.goodbit); assert(is.exceptions() == is.goodbit); Index: libcxx/test/std/input.output/iostream.format/input.streams/istream/istream_sentry/ctor.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostream.format/input.streams/istream/istream_sentry/ctor.pass.cpp +++ libcxx/test/std/input.output/iostream.format/input.streams/istream/istream_sentry/ctor.pass.cpp @@ -54,7 +54,7 @@ int main(int, char**) { { - std::istream is((testbuf*)0); + std::istream is((testbuf*)nullptr); std::istream::sentry sen(is, true); assert(!(bool)sen); assert(!is.good()); @@ -102,7 +102,7 @@ #ifndef TEST_HAS_NO_WIDE_CHARACTERS { - std::wistream is((testbuf*)0); + std::wistream is((testbuf*)nullptr); std::wistream::sentry sen(is, true); assert(!(bool)sen); assert(!is.good()); Index: libcxx/test/std/input.output/iostream.format/output.streams/ostream.assign/member_swap.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostream.format/output.streams/ostream.assign/member_swap.pass.cpp +++ libcxx/test/std/input.output/iostream.format/output.streams/ostream.assign/member_swap.pass.cpp @@ -44,7 +44,7 @@ test_ostream os2(&sb2); os1.swap(os2); assert(os1.rdbuf() == &sb1); - assert(os1.tie() == 0); + assert(os1.tie() == nullptr); assert(os1.fill() == ' '); assert(os1.rdstate() == os1.goodbit); assert(os1.exceptions() == os1.goodbit); @@ -52,7 +52,7 @@ assert(os1.precision() == 6); assert(os1.getloc().name() == "C"); assert(os2.rdbuf() == &sb2); - assert(os2.tie() == 0); + assert(os2.tie() == nullptr); assert(os2.fill() == ' '); assert(os2.rdstate() == os2.goodbit); assert(os2.exceptions() == os2.goodbit); @@ -68,7 +68,7 @@ test_ostream os2(&sb2); os1.swap(os2); assert(os1.rdbuf() == &sb1); - assert(os1.tie() == 0); + assert(os1.tie() == nullptr); assert(os1.fill() == ' '); assert(os1.rdstate() == os1.goodbit); assert(os1.exceptions() == os1.goodbit); @@ -76,7 +76,7 @@ assert(os1.precision() == 6); assert(os1.getloc().name() == "C"); assert(os2.rdbuf() == &sb2); - assert(os2.tie() == 0); + assert(os2.tie() == nullptr); assert(os2.fill() == ' '); assert(os2.rdstate() == os2.goodbit); assert(os2.exceptions() == os2.goodbit); Index: libcxx/test/std/input.output/iostream.format/output.streams/ostream.assign/move_assign.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostream.format/output.streams/ostream.assign/move_assign.pass.cpp +++ libcxx/test/std/input.output/iostream.format/output.streams/ostream.assign/move_assign.pass.cpp @@ -47,7 +47,7 @@ test_ostream os2(&sb2); os2 = (std::move(os1)); assert(os1.rdbuf() == &sb1); - assert(os1.tie() == 0); + assert(os1.tie() == nullptr); assert(os1.fill() == ' '); assert(os1.rdstate() == os1.goodbit); assert(os1.exceptions() == os1.goodbit); @@ -55,7 +55,7 @@ assert(os1.precision() == 6); assert(os1.getloc().name() == "C"); assert(os2.rdbuf() == &sb2); - assert(os2.tie() == 0); + assert(os2.tie() == nullptr); assert(os2.fill() == ' '); assert(os2.rdstate() == os2.goodbit); assert(os2.exceptions() == os2.goodbit); @@ -71,7 +71,7 @@ test_ostream os2(&sb2); os2 = (std::move(os1)); assert(os1.rdbuf() == &sb1); - assert(os1.tie() == 0); + assert(os1.tie() == nullptr); assert(os1.fill() == ' '); assert(os1.rdstate() == os1.goodbit); assert(os1.exceptions() == os1.goodbit); @@ -79,7 +79,7 @@ assert(os1.precision() == 6); assert(os1.getloc().name() == "C"); assert(os2.rdbuf() == &sb2); - assert(os2.tie() == 0); + assert(os2.tie() == nullptr); assert(os2.fill() == ' '); assert(os2.rdstate() == os2.goodbit); assert(os2.exceptions() == os2.goodbit); Index: libcxx/test/std/input.output/iostream.format/output.streams/ostream.cons/move.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostream.format/output.streams/ostream.cons/move.pass.cpp +++ libcxx/test/std/input.output/iostream.format/output.streams/ostream.cons/move.pass.cpp @@ -45,8 +45,8 @@ test_ostream os1(&sb); test_ostream os(std::move(os1)); assert(os1.rdbuf() == &sb); - assert(os.rdbuf() == 0); - assert(os.tie() == 0); + assert(os.rdbuf() == nullptr); + assert(os.tie() == nullptr); assert(os.fill() == ' '); assert(os.rdstate() == os.goodbit); assert(os.exceptions() == os.goodbit); @@ -60,8 +60,8 @@ test_ostream os1(&sb); test_ostream os(std::move(os1)); assert(os1.rdbuf() == &sb); - assert(os.rdbuf() == 0); - assert(os.tie() == 0); + assert(os.rdbuf() == nullptr); + assert(os.tie() == nullptr); assert(os.fill() == L' '); assert(os.rdstate() == os.goodbit); assert(os.exceptions() == os.goodbit); Index: libcxx/test/std/input.output/iostream.format/output.streams/ostream.cons/streambuf.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostream.format/output.streams/ostream.cons/streambuf.pass.cpp +++ libcxx/test/std/input.output/iostream.format/output.streams/ostream.cons/streambuf.pass.cpp @@ -31,7 +31,7 @@ testbuf sb; std::basic_ostream os(&sb); assert(os.rdbuf() == &sb); - assert(os.tie() == 0); + assert(os.tie() == nullptr); assert(os.fill() == ' '); assert(os.rdstate() == os.goodbit); assert(os.exceptions() == os.goodbit); @@ -44,7 +44,7 @@ testbuf sb; std::basic_ostream os(&sb); assert(os.rdbuf() == &sb); - assert(os.tie() == 0); + assert(os.tie() == nullptr); assert(os.fill() == L' '); assert(os.rdstate() == os.goodbit); assert(os.exceptions() == os.goodbit); Index: libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/bool.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/bool.pass.cpp +++ libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/bool.pass.cpp @@ -53,7 +53,7 @@ int main(int, char**) { { - std::ostream os((std::streambuf*)0); + std::ostream os((std::streambuf*)nullptr); bool b = false; os << b; assert(os.bad()); Index: libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/double.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/double.pass.cpp +++ libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/double.pass.cpp @@ -53,7 +53,7 @@ int main(int, char**) { { - std::ostream os((std::streambuf*)0); + std::ostream os((std::streambuf*)nullptr); double n = 0; os << n; assert(os.bad()); Index: libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/float.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/float.pass.cpp +++ libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/float.pass.cpp @@ -53,7 +53,7 @@ int main(int, char**) { { - std::ostream os((std::streambuf*)0); + std::ostream os((std::streambuf*)nullptr); float n = 0; os << n; assert(os.bad()); Index: libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/int.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/int.pass.cpp +++ libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/int.pass.cpp @@ -53,7 +53,7 @@ int main(int, char**) { { - std::ostream os((std::streambuf*)0); + std::ostream os((std::streambuf*)nullptr); int n = 0; os << n; assert(os.bad()); Index: libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/long.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/long.pass.cpp +++ libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/long.pass.cpp @@ -53,7 +53,7 @@ int main(int, char**) { { - std::ostream os((std::streambuf*)0); + std::ostream os((std::streambuf*)nullptr); long n = 0; os << n; assert(os.bad()); Index: libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/long_double.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/long_double.pass.cpp +++ libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/long_double.pass.cpp @@ -53,7 +53,7 @@ int main(int, char**) { { - std::ostream os((std::streambuf*)0); + std::ostream os((std::streambuf*)nullptr); long double n = 0; os << n; assert(os.bad()); Index: libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/long_long.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/long_long.pass.cpp +++ libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/long_long.pass.cpp @@ -53,7 +53,7 @@ int main(int, char**) { { - std::ostream os((std::streambuf*)0); + std::ostream os((std::streambuf*)nullptr); long long n = 0; os << n; assert(os.bad()); Index: libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/pointer.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/pointer.pass.cpp +++ libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/pointer.pass.cpp @@ -53,7 +53,7 @@ int main(int, char**) { { - std::ostream os((std::streambuf*)0); + std::ostream os((std::streambuf*)nullptr); const void* n = 0; os << n; assert(os.bad()); Index: libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/short.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/short.pass.cpp +++ libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/short.pass.cpp @@ -53,7 +53,7 @@ int main(int, char**) { { - std::ostream os((std::streambuf*)0); + std::ostream os((std::streambuf*)nullptr); short n = 0; os << n; assert(os.bad()); Index: libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/unsigned_int.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/unsigned_int.pass.cpp +++ libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/unsigned_int.pass.cpp @@ -53,7 +53,7 @@ int main(int, char**) { { - std::ostream os((std::streambuf*)0); + std::ostream os((std::streambuf*)nullptr); unsigned int n = 0; os << n; assert(os.bad()); Index: libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/unsigned_long.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/unsigned_long.pass.cpp +++ libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/unsigned_long.pass.cpp @@ -53,7 +53,7 @@ int main(int, char**) { { - std::ostream os((std::streambuf*)0); + std::ostream os((std::streambuf*)nullptr); unsigned long n = 0; os << n; assert(os.bad()); Index: libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/unsigned_long_long.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/unsigned_long_long.pass.cpp +++ libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/unsigned_long_long.pass.cpp @@ -53,7 +53,7 @@ int main(int, char**) { { - std::ostream os((std::streambuf*)0); + std::ostream os((std::streambuf*)nullptr); unsigned long long n = 0; os << n; assert(os.bad()); Index: libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/unsigned_short.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/unsigned_short.pass.cpp +++ libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/unsigned_short.pass.cpp @@ -53,7 +53,7 @@ int main(int, char**) { { - std::ostream os((std::streambuf*)0); + std::ostream os((std::streambuf*)nullptr); unsigned short n = 0; os << n; assert(os.bad()); Index: libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/CharT.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/CharT.pass.cpp +++ libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/CharT.pass.cpp @@ -56,7 +56,7 @@ int main(int, char**) { { - std::wostream os((std::wstreambuf*)0); + std::wostream os((std::wstreambuf*)nullptr); wchar_t c = L'a'; os << c; assert(os.bad()); Index: libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/CharT_pointer.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/CharT_pointer.pass.cpp +++ libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/CharT_pointer.pass.cpp @@ -56,7 +56,7 @@ int main(int, char**) { { - std::wostream os((std::wstreambuf*)0); + std::wostream os((std::wstreambuf*)nullptr); const wchar_t* c = L"123"; os << c; assert(os.bad()); Index: libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/char.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/char.pass.cpp +++ libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/char.pass.cpp @@ -54,7 +54,7 @@ int main(int, char**) { { - std::ostream os((std::streambuf*)0); + std::ostream os((std::streambuf*)nullptr); char c = 'a'; os << c; assert(os.bad()); Index: libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/char_pointer.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/char_pointer.pass.cpp +++ libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/char_pointer.pass.cpp @@ -54,7 +54,7 @@ int main(int, char**) { { - std::ostream os((std::streambuf*)0); + std::ostream os((std::streambuf*)nullptr); const char* c = "123"; os << c; assert(os.bad()); Index: libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/char_to_wide.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/char_to_wide.pass.cpp +++ libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/char_to_wide.pass.cpp @@ -56,7 +56,7 @@ int main(int, char**) { { - std::wostream os((std::wstreambuf*)0); + std::wostream os((std::wstreambuf*)nullptr); char c = 'a'; os << c; assert(os.bad()); Index: libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/char_to_wide_pointer.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/char_to_wide_pointer.pass.cpp +++ libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/char_to_wide_pointer.pass.cpp @@ -56,7 +56,7 @@ int main(int, char**) { { - std::wostream os((std::wstreambuf*)0); + std::wostream os((std::wstreambuf*)nullptr); const char* c = "123"; os << c; assert(os.bad()); Index: libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/signed_char.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/signed_char.pass.cpp +++ libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/signed_char.pass.cpp @@ -54,7 +54,7 @@ int main(int, char**) { { - std::ostream os((std::streambuf*)0); + std::ostream os((std::streambuf*)nullptr); signed char c = 'a'; os << c; assert(os.bad()); Index: libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/signed_char_pointer.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/signed_char_pointer.pass.cpp +++ libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/signed_char_pointer.pass.cpp @@ -54,7 +54,7 @@ int main(int, char**) { { - std::ostream os((std::streambuf*)0); + std::ostream os((std::streambuf*)nullptr); const signed char* c = (const signed char*)"123"; os << c; assert(os.bad()); Index: libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/unsigned_char.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/unsigned_char.pass.cpp +++ libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/unsigned_char.pass.cpp @@ -54,7 +54,7 @@ int main(int, char**) { { - std::ostream os((std::streambuf*)0); + std::ostream os((std::streambuf*)nullptr); unsigned char c = 'a'; os << c; assert(os.bad()); Index: libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/unsigned_char_pointer.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/unsigned_char_pointer.pass.cpp +++ libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/unsigned_char_pointer.pass.cpp @@ -54,7 +54,7 @@ int main(int, char**) { { - std::ostream os((std::streambuf*)0); + std::ostream os((std::streambuf*)nullptr); const unsigned char* c = (const unsigned char*)"123"; os << c; assert(os.bad()); Index: libcxx/test/std/input.output/iostream.format/output.streams/ostream.seeks/seekp.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostream.format/output.streams/ostream.seeks/seekp.pass.cpp +++ libcxx/test/std/input.output/iostream.format/output.streams/ostream.seeks/seekp.pass.cpp @@ -42,7 +42,7 @@ { { seekpos_called = 0; - std::ostream os((std::streambuf*)0); + std::ostream os((std::streambuf*)nullptr); assert(&os.seekp(5) == &os); assert(seekpos_called == 0); } Index: libcxx/test/std/input.output/iostream.format/output.streams/ostream.seeks/seekp2.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostream.format/output.streams/ostream.seeks/seekp2.pass.cpp +++ libcxx/test/std/input.output/iostream.format/output.streams/ostream.seeks/seekp2.pass.cpp @@ -44,7 +44,7 @@ { { seekoff_called = 0; - std::ostream os((std::streambuf*)0); + std::ostream os((std::streambuf*)nullptr); assert(&os.seekp(5, std::ios_base::beg) == &os); assert(seekoff_called == 0); } Index: libcxx/test/std/input.output/iostream.format/output.streams/ostream.seeks/tellp.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostream.format/output.streams/ostream.seeks/tellp.pass.cpp +++ libcxx/test/std/input.output/iostream.format/output.streams/ostream.seeks/tellp.pass.cpp @@ -43,7 +43,7 @@ int main(int, char**) { { - std::ostream os((std::streambuf*)0); + std::ostream os((std::streambuf*)nullptr); assert(os.tellp() == -1); } { Index: libcxx/test/std/input.output/iostream.format/output.streams/ostream.unformatted/put.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostream.format/output.streams/ostream.unformatted/put.pass.cpp +++ libcxx/test/std/input.output/iostream.format/output.streams/ostream.unformatted/put.pass.cpp @@ -53,7 +53,7 @@ int main(int, char**) { { - std::ostream os((std::streambuf*)0); + std::ostream os((std::streambuf*)nullptr); char c = 'a'; os.put(c); assert(os.bad()); @@ -68,7 +68,7 @@ } #ifndef TEST_HAS_NO_WIDE_CHARACTERS { - std::wostream os((std::wstreambuf*)0); + std::wostream os((std::wstreambuf*)nullptr); wchar_t c = L'a'; os.put(c); assert(os.bad()); Index: libcxx/test/std/input.output/iostream.format/output.streams/ostream.unformatted/write.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostream.format/output.streams/ostream.unformatted/write.pass.cpp +++ libcxx/test/std/input.output/iostream.format/output.streams/ostream.unformatted/write.pass.cpp @@ -53,7 +53,7 @@ int main(int, char**) { { - std::ostream os((std::streambuf*)0); + std::ostream os((std::streambuf*)nullptr); const char s[] = "123456790"; os.write(s, sizeof(s)/sizeof(s[0])-1); assert(os.bad()); @@ -68,7 +68,7 @@ } #ifndef TEST_HAS_NO_WIDE_CHARACTERS { - std::wostream os((std::wstreambuf*)0); + std::wostream os((std::wstreambuf*)nullptr); const wchar_t s[] = L"123456790"; os.write(s, sizeof(s)/sizeof(s[0])-1); assert(os.bad()); Index: libcxx/test/std/input.output/iostream.format/output.streams/ostream_sentry/construct.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostream.format/output.streams/ostream_sentry/construct.pass.cpp +++ libcxx/test/std/input.output/iostream.format/output.streams/ostream_sentry/construct.pass.cpp @@ -38,7 +38,7 @@ int main(int, char**) { { - std::ostream os((std::streambuf*)0); + std::ostream os((std::streambuf*)nullptr); std::ostream::sentry s(os); assert(!bool(s)); } Index: libcxx/test/std/input.output/iostream.format/output.streams/ostream_sentry/destruct.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostream.format/output.streams/ostream_sentry/destruct.pass.cpp +++ libcxx/test/std/input.output/iostream.format/output.streams/ostream_sentry/destruct.pass.cpp @@ -38,7 +38,7 @@ int main(int, char**) { { - std::ostream os((std::streambuf*)0); + std::ostream os((std::streambuf*)nullptr); std::ostream::sentry s(os); assert(!bool(s)); } Index: libcxx/test/std/input.output/iostreams.base/ios/basic.ios.cons/ctor_streambuf.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostreams.base/ios/basic.ios.cons/ctor_streambuf.pass.cpp +++ libcxx/test/std/input.output/iostreams.base/ios/basic.ios.cons/ctor_streambuf.pass.cpp @@ -24,7 +24,7 @@ std::streambuf* sb = 0; std::basic_ios ios(sb); assert(ios.rdbuf() == sb); - assert(ios.tie() == 0); + assert(ios.tie() == nullptr); assert(ios.rdstate() == std::ios::badbit); assert(ios.exceptions() == std::ios::goodbit); assert(ios.flags() == (std::ios::skipws | std::ios::dec)); @@ -37,7 +37,7 @@ std::streambuf* sb = (std::streambuf*)1; std::basic_ios ios(sb); assert(ios.rdbuf() == sb); - assert(ios.tie() == 0); + assert(ios.tie() == nullptr); assert(ios.rdstate() == std::ios::goodbit); assert(ios.exceptions() == std::ios::goodbit); assert(ios.flags() == (std::ios::skipws | std::ios::dec)); Index: libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/fill.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/fill.pass.cpp +++ libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/fill.pass.cpp @@ -19,7 +19,7 @@ int main(int, char**) { - const std::ios ios(0); + const std::ios ios(nullptr); assert(ios.fill() == ' '); return 0; Index: libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/fill_char_type.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/fill_char_type.pass.cpp +++ libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/fill_char_type.pass.cpp @@ -19,7 +19,7 @@ int main(int, char**) { - std::ios ios(0); + std::ios ios(nullptr); char c = ios.fill('*'); assert(c == ' '); assert(ios.fill() == '*'); Index: libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/imbue.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/imbue.pass.cpp +++ libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/imbue.pass.cpp @@ -72,7 +72,7 @@ int main(int, char**) { { - std::ios ios(0); + std::ios ios(nullptr); ios.register_callback(f1, 4); ios.register_callback(f2, 5); ios.register_callback(f3, 6); Index: libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/move.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/move.pass.cpp +++ libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/move.pass.cpp @@ -107,7 +107,7 @@ ios1.move(ios2); assert(ios1.rdstate() == std::ios::goodbit); - assert(ios1.rdbuf() == 0); + assert(ios1.rdbuf() == nullptr); assert(ios1.flags() == (std::ios::showpoint | std::ios::uppercase)); assert(ios1.precision() == 2); assert(ios1.width() == 12); @@ -136,7 +136,7 @@ assert(g3_called); assert(ios2.rdbuf() == &sb2); - assert(ios2.tie() == 0); + assert(ios2.tie() == nullptr); return 0; } Index: libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/narrow.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/narrow.pass.cpp +++ libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/narrow.pass.cpp @@ -21,7 +21,7 @@ int main(int, char**) { - const std::wios ios(0); + const std::wios ios(nullptr); assert(ios.narrow(L'c', '*') == 'c'); assert(ios.narrow(L'\u203C', '*') == '*'); Index: libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/rdbuf.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/rdbuf.pass.cpp +++ libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/rdbuf.pass.cpp @@ -21,8 +21,8 @@ int main(int, char**) { { - const std::ios ios(0); - assert(ios.rdbuf() == 0); + const std::ios ios(nullptr); + assert(ios.rdbuf() == nullptr); } { std::streambuf* sb = (std::streambuf*)1; Index: libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/rdbuf_streambuf.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/rdbuf_streambuf.pass.cpp +++ libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/rdbuf_streambuf.pass.cpp @@ -20,8 +20,8 @@ int main(int, char**) { - std::ios ios(0); - assert(ios.rdbuf() == 0); + std::ios ios(nullptr); + assert(ios.rdbuf() == nullptr); assert(!ios.good()); std::streambuf* sb = (std::streambuf*)1; std::streambuf* sb2 = ios.rdbuf(sb); @@ -30,7 +30,7 @@ assert(ios.good()); sb2 = ios.rdbuf(0); assert(sb2 == (std::streambuf*)1); - assert(ios.rdbuf() == 0); + assert(ios.rdbuf() == nullptr); assert(ios.bad()); return 0; Index: libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/set_rdbuf.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/set_rdbuf.pass.cpp +++ libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/set_rdbuf.pass.cpp @@ -59,7 +59,7 @@ } #endif ios.set_rdbuf(0); - assert(ios.rdbuf() == 0); + assert(ios.rdbuf() == nullptr); return 0; } Index: libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/tie.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/tie.pass.cpp +++ libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/tie.pass.cpp @@ -20,7 +20,7 @@ int main(int, char**) { const std::basic_ios ios(0); - assert(ios.tie() == 0); + assert(ios.tie() == nullptr); return 0; } Index: libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/tie_ostream.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/tie_ostream.pass.cpp +++ libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/tie_ostream.pass.cpp @@ -19,7 +19,7 @@ int main(int, char**) { - std::ios ios(0); + std::ios ios(nullptr); std::ostream* os = (std::ostream*)1; std::ostream* r = ios.tie(os); assert(r == 0); Index: libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/widen.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/widen.pass.cpp +++ libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/widen.pass.cpp @@ -19,7 +19,7 @@ int main(int, char**) { - const std::ios ios(0); + const std::ios ios(nullptr); assert(ios.widen('c') == 'c'); return 0; Index: libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/bad.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/bad.pass.cpp +++ libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/bad.pass.cpp @@ -23,7 +23,7 @@ int main(int, char**) { { - std::ios ios(0); + std::ios ios(nullptr); assert(ios.bad()); ios.setstate(std::ios::eofbit); assert(ios.bad()); Index: libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/bool.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/bool.pass.cpp +++ libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/bool.pass.cpp @@ -20,7 +20,7 @@ int main(int, char**) { - std::ios ios(0); + std::ios ios(nullptr); assert(static_cast(ios) == !ios.fail()); ios.setstate(std::ios::failbit); assert(static_cast(ios) == !ios.fail()); Index: libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/clear.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/clear.pass.cpp +++ libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/clear.pass.cpp @@ -23,7 +23,7 @@ int main(int, char**) { { - std::ios ios(0); + std::ios ios(nullptr); ios.clear(); assert(ios.rdstate() == std::ios::badbit); #ifndef TEST_HAS_NO_EXCEPTIONS Index: libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/eof.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/eof.pass.cpp +++ libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/eof.pass.cpp @@ -23,7 +23,7 @@ int main(int, char**) { { - std::ios ios(0); + std::ios ios(nullptr); assert(!ios.eof()); ios.setstate(std::ios::eofbit); assert(ios.eof()); Index: libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/exceptions.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/exceptions.pass.cpp +++ libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/exceptions.pass.cpp @@ -23,7 +23,7 @@ int main(int, char**) { { - const std::ios ios(0); + const std::ios ios(nullptr); assert(ios.exceptions() == std::ios::goodbit); } { Index: libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/exceptions_iostate.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/exceptions_iostate.pass.cpp +++ libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/exceptions_iostate.pass.cpp @@ -23,7 +23,7 @@ int main(int, char**) { { - std::ios ios(0); + std::ios ios(nullptr); assert(ios.exceptions() == std::ios::goodbit); ios.exceptions(std::ios::eofbit); assert(ios.exceptions() == std::ios::eofbit); Index: libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/fail.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/fail.pass.cpp +++ libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/fail.pass.cpp @@ -23,7 +23,7 @@ int main(int, char**) { { - std::ios ios(0); + std::ios ios(nullptr); assert(ios.fail()); ios.setstate(std::ios::eofbit); assert(ios.fail()); Index: libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/good.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/good.pass.cpp +++ libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/good.pass.cpp @@ -23,7 +23,7 @@ int main(int, char**) { { - std::ios ios(0); + std::ios ios(nullptr); assert(!ios.good()); } { Index: libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/not.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/not.pass.cpp +++ libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/not.pass.cpp @@ -19,7 +19,7 @@ int main(int, char**) { - std::ios ios(0); + std::ios ios(nullptr); assert(!ios == ios.fail()); ios.setstate(std::ios::failbit); assert(!ios == ios.fail()); Index: libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/rdstate.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/rdstate.pass.cpp +++ libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/rdstate.pass.cpp @@ -19,7 +19,7 @@ int main(int, char**) { - std::ios ios(0); + std::ios ios(nullptr); assert(ios.rdstate() == std::ios::badbit); ios.setstate(std::ios::failbit); assert(ios.rdstate() == (std::ios::failbit | std::ios::badbit)); Index: libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/setstate.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/setstate.pass.cpp +++ libcxx/test/std/input.output/iostreams.base/ios/iostate.flags/setstate.pass.cpp @@ -23,7 +23,7 @@ int main(int, char**) { { - std::ios ios(0); + std::ios ios(nullptr); ios.setstate(std::ios::goodbit); assert(ios.rdstate() == std::ios::badbit); #ifndef TEST_HAS_NO_EXCEPTIONS Index: libcxx/test/std/input.output/string.streams/istringstream/istringstream.assign/member_swap.pass.cpp =================================================================== --- libcxx/test/std/input.output/string.streams/istringstream/istringstream.assign/member_swap.pass.cpp +++ libcxx/test/std/input.output/string.streams/istringstream/istringstream.assign/member_swap.pass.cpp @@ -24,7 +24,7 @@ std::istringstream ss0(" 123 456"); std::istringstream ss(" 789 321"); ss.swap(ss0); - assert(ss.rdbuf() != 0); + assert(ss.rdbuf() != nullptr); assert(ss.good()); assert(ss.str() == " 123 456"); int i = 0; @@ -42,7 +42,7 @@ std::wistringstream ss0(L" 123 456"); std::wistringstream ss(L" 789 321"); ss.swap(ss0); - assert(ss.rdbuf() != 0); + assert(ss.rdbuf() != nullptr); assert(ss.good()); assert(ss.str() == L" 123 456"); int i = 0; Index: libcxx/test/std/input.output/string.streams/istringstream/istringstream.assign/move.pass.cpp =================================================================== --- libcxx/test/std/input.output/string.streams/istringstream/istringstream.assign/move.pass.cpp +++ libcxx/test/std/input.output/string.streams/istringstream/istringstream.assign/move.pass.cpp @@ -24,7 +24,7 @@ std::istringstream ss0(" 123 456"); std::istringstream ss; ss = std::move(ss0); - assert(ss.rdbuf() != 0); + assert(ss.rdbuf() != nullptr); assert(ss.good()); assert(ss.str() == " 123 456"); int i = 0; @@ -56,7 +56,7 @@ std::wistringstream ss0(L" 123 456"); std::wistringstream ss; ss = std::move(ss0); - assert(ss.rdbuf() != 0); + assert(ss.rdbuf() != nullptr); assert(ss.good()); assert(ss.str() == L" 123 456"); int i = 0; Index: libcxx/test/std/input.output/string.streams/istringstream/istringstream.assign/nonmember_swap.pass.cpp =================================================================== --- libcxx/test/std/input.output/string.streams/istringstream/istringstream.assign/nonmember_swap.pass.cpp +++ libcxx/test/std/input.output/string.streams/istringstream/istringstream.assign/nonmember_swap.pass.cpp @@ -27,7 +27,7 @@ std::istringstream ss0(" 123 456"); std::istringstream ss(" 789 321"); swap(ss, ss0); - assert(ss.rdbuf() != 0); + assert(ss.rdbuf() != nullptr); assert(ss.good()); assert(ss.str() == " 123 456"); int i = 0; @@ -45,7 +45,7 @@ std::wistringstream ss0(L" 123 456"); std::wistringstream ss(L" 789 321"); swap(ss, ss0); - assert(ss.rdbuf() != 0); + assert(ss.rdbuf() != nullptr); assert(ss.good()); assert(ss.str() == L" 123 456"); int i = 0; Index: libcxx/test/std/input.output/string.streams/istringstream/istringstream.cons/default.pass.cpp =================================================================== --- libcxx/test/std/input.output/string.streams/istringstream/istringstream.cons/default.pass.cpp +++ libcxx/test/std/input.output/string.streams/istringstream/istringstream.cons/default.pass.cpp @@ -33,26 +33,26 @@ { { std::istringstream ss; - assert(ss.rdbuf() != 0); + assert(ss.rdbuf() != nullptr); assert(ss.good()); assert(ss.str() == ""); } { std::istringstream ss(std::ios_base::in); - assert(ss.rdbuf() != 0); + assert(ss.rdbuf() != nullptr); assert(ss.good()); assert(ss.str() == ""); } #ifndef TEST_HAS_NO_WIDE_CHARACTERS { std::wistringstream ss; - assert(ss.rdbuf() != 0); + assert(ss.rdbuf() != nullptr); assert(ss.good()); assert(ss.str() == L""); } { std::wistringstream ss(std::ios_base::in); - assert(ss.rdbuf() != 0); + assert(ss.rdbuf() != nullptr); assert(ss.good()); assert(ss.str() == L""); } Index: libcxx/test/std/input.output/string.streams/istringstream/istringstream.cons/move.pass.cpp =================================================================== --- libcxx/test/std/input.output/string.streams/istringstream/istringstream.cons/move.pass.cpp +++ libcxx/test/std/input.output/string.streams/istringstream/istringstream.cons/move.pass.cpp @@ -23,7 +23,7 @@ { std::istringstream ss0(" 123 456"); std::istringstream ss(std::move(ss0)); - assert(ss.rdbuf() != 0); + assert(ss.rdbuf() != nullptr); assert(ss.good()); assert(ss.str() == " 123 456"); int i = 0; @@ -36,7 +36,7 @@ { std::wistringstream ss0(L" 123 456"); std::wistringstream ss(std::move(ss0)); - assert(ss.rdbuf() != 0); + assert(ss.rdbuf() != nullptr); assert(ss.good()); assert(ss.str() == L" 123 456"); int i = 0; Index: libcxx/test/std/input.output/string.streams/istringstream/istringstream.cons/string.pass.cpp =================================================================== --- libcxx/test/std/input.output/string.streams/istringstream/istringstream.cons/string.pass.cpp +++ libcxx/test/std/input.output/string.streams/istringstream/istringstream.cons/string.pass.cpp @@ -23,7 +23,7 @@ { { std::istringstream ss(" 123 456"); - assert(ss.rdbuf() != 0); + assert(ss.rdbuf() != nullptr); assert(ss.good()); assert(ss.str() == " 123 456"); int i = 0; @@ -34,7 +34,7 @@ } { std::istringstream ss(" 123 456", std::ios_base::out); - assert(ss.rdbuf() != 0); + assert(ss.rdbuf() != nullptr); assert(ss.good()); assert(ss.str() == " 123 456"); int i = 0; @@ -46,7 +46,7 @@ #ifndef TEST_HAS_NO_WIDE_CHARACTERS { std::wistringstream ss(L" 123 456"); - assert(ss.rdbuf() != 0); + assert(ss.rdbuf() != nullptr); assert(ss.good()); assert(ss.str() == L" 123 456"); int i = 0; @@ -57,7 +57,7 @@ } { std::wistringstream ss(L" 123 456", std::ios_base::out); - assert(ss.rdbuf() != 0); + assert(ss.rdbuf() != nullptr); assert(ss.good()); assert(ss.str() == L" 123 456"); int i = 0; Index: libcxx/test/std/input.output/string.streams/istringstream/istringstream.members/str.pass.cpp =================================================================== --- libcxx/test/std/input.output/string.streams/istringstream/istringstream.members/str.pass.cpp +++ libcxx/test/std/input.output/string.streams/istringstream/istringstream.members/str.pass.cpp @@ -22,7 +22,7 @@ { { std::istringstream ss(" 123 456"); - assert(ss.rdbuf() != 0); + assert(ss.rdbuf() != nullptr); assert(ss.good()); assert(ss.str() == " 123 456"); int i = 0; @@ -40,7 +40,7 @@ #ifndef TEST_HAS_NO_WIDE_CHARACTERS { std::wistringstream ss(L" 123 456"); - assert(ss.rdbuf() != 0); + assert(ss.rdbuf() != nullptr); assert(ss.good()); assert(ss.str() == L" 123 456"); int i = 0; Index: libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.assign/member_swap.pass.cpp =================================================================== --- libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.assign/member_swap.pass.cpp +++ libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.assign/member_swap.pass.cpp @@ -24,7 +24,7 @@ std::ostringstream ss0(" 123 456"); std::ostringstream ss; ss.swap(ss0); - assert(ss.rdbuf() != 0); + assert(ss.rdbuf() != nullptr); assert(ss.good()); assert(ss.str() == " 123 456"); int i = 234; @@ -38,7 +38,7 @@ std::wostringstream ss0(L" 123 456"); std::wostringstream ss; ss.swap(ss0); - assert(ss.rdbuf() != 0); + assert(ss.rdbuf() != nullptr); assert(ss.good()); assert(ss.str() == L" 123 456"); int i = 234; Index: libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.assign/move.pass.cpp =================================================================== --- libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.assign/move.pass.cpp +++ libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.assign/move.pass.cpp @@ -24,7 +24,7 @@ std::ostringstream ss0(" 123 456"); std::ostringstream ss; ss = std::move(ss0); - assert(ss.rdbuf() != 0); + assert(ss.rdbuf() != nullptr); assert(ss.good()); assert(ss.str() == " 123 456"); int i = 234; @@ -36,7 +36,7 @@ std::wostringstream ss0(L" 123 456"); std::wostringstream ss; ss = std::move(ss0); - assert(ss.rdbuf() != 0); + assert(ss.rdbuf() != nullptr); assert(ss.good()); assert(ss.str() == L" 123 456"); int i = 234; Index: libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.assign/nonmember_swap.pass.cpp =================================================================== --- libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.assign/nonmember_swap.pass.cpp +++ libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.assign/nonmember_swap.pass.cpp @@ -24,7 +24,7 @@ std::ostringstream ss0(" 123 456"); std::ostringstream ss; swap(ss, ss0); - assert(ss.rdbuf() != 0); + assert(ss.rdbuf() != nullptr); assert(ss.good()); assert(ss.str() == " 123 456"); int i = 234; @@ -38,7 +38,7 @@ std::wostringstream ss0(L" 123 456"); std::wostringstream ss; swap(ss, ss0); - assert(ss.rdbuf() != 0); + assert(ss.rdbuf() != nullptr); assert(ss.good()); assert(ss.str() == L" 123 456"); int i = 234; Index: libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.cons/default.pass.cpp =================================================================== --- libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.cons/default.pass.cpp +++ libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.cons/default.pass.cpp @@ -33,26 +33,26 @@ { { std::ostringstream ss; - assert(ss.rdbuf() != 0); + assert(ss.rdbuf() != nullptr); assert(ss.good()); assert(ss.str() == ""); } { std::ostringstream ss(std::ios_base::out); - assert(ss.rdbuf() != 0); + assert(ss.rdbuf() != nullptr); assert(ss.good()); assert(ss.str() == ""); } #ifndef TEST_HAS_NO_WIDE_CHARACTERS { std::wostringstream ss; - assert(ss.rdbuf() != 0); + assert(ss.rdbuf() != nullptr); assert(ss.good()); assert(ss.str() == L""); } { std::wostringstream ss(std::ios_base::out); - assert(ss.rdbuf() != 0); + assert(ss.rdbuf() != nullptr); assert(ss.good()); assert(ss.str() == L""); } Index: libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.cons/move.pass.cpp =================================================================== --- libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.cons/move.pass.cpp +++ libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.cons/move.pass.cpp @@ -23,7 +23,7 @@ { std::ostringstream ss0(" 123 456"); std::ostringstream ss(std::move(ss0)); - assert(ss.rdbuf() != 0); + assert(ss.rdbuf() != nullptr); assert(ss.good()); assert(ss.str() == " 123 456"); int i = 234; @@ -34,7 +34,7 @@ { std::wostringstream ss0(L" 123 456"); std::wostringstream ss(std::move(ss0)); - assert(ss.rdbuf() != 0); + assert(ss.rdbuf() != nullptr); assert(ss.good()); assert(ss.str() == L" 123 456"); int i = 234; Index: libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.cons/string.pass.cpp =================================================================== --- libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.cons/string.pass.cpp +++ libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.cons/string.pass.cpp @@ -23,7 +23,7 @@ { { std::ostringstream ss(" 123 456"); - assert(ss.rdbuf() != 0); + assert(ss.rdbuf() != nullptr); assert(ss.good()); assert(ss.str() == " 123 456"); int i = 234; @@ -32,7 +32,7 @@ } { std::ostringstream ss(" 123 456", std::ios_base::in); - assert(ss.rdbuf() != 0); + assert(ss.rdbuf() != nullptr); assert(ss.good()); assert(ss.str() == " 123 456"); int i = 234; @@ -42,7 +42,7 @@ #ifndef TEST_HAS_NO_WIDE_CHARACTERS { std::wostringstream ss(L" 123 456"); - assert(ss.rdbuf() != 0); + assert(ss.rdbuf() != nullptr); assert(ss.good()); assert(ss.str() == L" 123 456"); int i = 234; @@ -51,7 +51,7 @@ } { std::wostringstream ss(L" 123 456", std::ios_base::in); - assert(ss.rdbuf() != 0); + assert(ss.rdbuf() != nullptr); assert(ss.good()); assert(ss.str() == L" 123 456"); int i = 234; Index: libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.members/str.pass.cpp =================================================================== --- libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.members/str.pass.cpp +++ libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.members/str.pass.cpp @@ -22,7 +22,7 @@ { { std::ostringstream ss(" 123 456"); - assert(ss.rdbuf() != 0); + assert(ss.rdbuf() != nullptr); assert(ss.good()); assert(ss.str() == " 123 456"); int i = 0; @@ -38,7 +38,7 @@ #ifndef TEST_HAS_NO_WIDE_CHARACTERS { std::wostringstream ss(L" 123 456"); - assert(ss.rdbuf() != 0); + assert(ss.rdbuf() != nullptr); assert(ss.good()); assert(ss.str() == L" 123 456"); int i = 0; Index: libcxx/test/std/input.output/string.streams/stringstream.cons/default.pass.cpp =================================================================== --- libcxx/test/std/input.output/string.streams/stringstream.cons/default.pass.cpp +++ libcxx/test/std/input.output/string.streams/stringstream.cons/default.pass.cpp @@ -33,26 +33,26 @@ { { std::stringstream ss; - assert(ss.rdbuf() != 0); + assert(ss.rdbuf() != nullptr); assert(ss.good()); assert(ss.str() == ""); } { std::stringstream ss(std::ios_base::in); - assert(ss.rdbuf() != 0); + assert(ss.rdbuf() != nullptr); assert(ss.good()); assert(ss.str() == ""); } #ifndef TEST_HAS_NO_WIDE_CHARACTERS { std::wstringstream ss; - assert(ss.rdbuf() != 0); + assert(ss.rdbuf() != nullptr); assert(ss.good()); assert(ss.str() == L""); } { std::wstringstream ss(std::ios_base::in); - assert(ss.rdbuf() != 0); + assert(ss.rdbuf() != nullptr); assert(ss.good()); assert(ss.str() == L""); } Index: libcxx/test/std/input.output/string.streams/stringstream.cons/move.pass.cpp =================================================================== --- libcxx/test/std/input.output/string.streams/stringstream.cons/move.pass.cpp +++ libcxx/test/std/input.output/string.streams/stringstream.cons/move.pass.cpp @@ -23,7 +23,7 @@ { std::stringstream ss0(" 123 456 "); std::stringstream ss(std::move(ss0)); - assert(ss.rdbuf() != 0); + assert(ss.rdbuf() != nullptr); assert(ss.good()); assert(ss.str() == " 123 456 "); int i = 0; @@ -38,7 +38,7 @@ { std::wstringstream ss0(L" 123 456 "); std::wstringstream ss(std::move(ss0)); - assert(ss.rdbuf() != 0); + assert(ss.rdbuf() != nullptr); assert(ss.good()); assert(ss.str() == L" 123 456 "); int i = 0; Index: libcxx/test/std/input.output/string.streams/stringstream.cons/string.pass.cpp =================================================================== --- libcxx/test/std/input.output/string.streams/stringstream.cons/string.pass.cpp +++ libcxx/test/std/input.output/string.streams/stringstream.cons/string.pass.cpp @@ -33,7 +33,7 @@ { { std::stringstream ss(" 123 456 "); - assert(ss.rdbuf() != 0); + assert(ss.rdbuf() != nullptr); assert(ss.good()); assert(ss.str() == " 123 456 "); int i = 0; @@ -47,7 +47,7 @@ #ifndef TEST_HAS_NO_WIDE_CHARACTERS { std::wstringstream ss(L" 123 456 "); - assert(ss.rdbuf() != 0); + assert(ss.rdbuf() != nullptr); assert(ss.good()); assert(ss.str() == L" 123 456 "); int i = 0; Index: libcxx/test/std/input.output/string.streams/stringstream.cons/stringstream.assign/member_swap.pass.cpp =================================================================== --- libcxx/test/std/input.output/string.streams/stringstream.cons/stringstream.assign/member_swap.pass.cpp +++ libcxx/test/std/input.output/string.streams/stringstream.cons/stringstream.assign/member_swap.pass.cpp @@ -24,7 +24,7 @@ std::stringstream ss0(" 123 456 "); std::stringstream ss; ss.swap(ss0); - assert(ss.rdbuf() != 0); + assert(ss.rdbuf() != nullptr); assert(ss.good()); assert(ss.str() == " 123 456 "); int i = 0; @@ -42,7 +42,7 @@ std::wstringstream ss0(L" 123 456 "); std::wstringstream ss; ss.swap(ss0); - assert(ss.rdbuf() != 0); + assert(ss.rdbuf() != nullptr); assert(ss.good()); assert(ss.str() == L" 123 456 "); int i = 0; Index: libcxx/test/std/input.output/string.streams/stringstream.cons/stringstream.assign/move.pass.cpp =================================================================== --- libcxx/test/std/input.output/string.streams/stringstream.cons/stringstream.assign/move.pass.cpp +++ libcxx/test/std/input.output/string.streams/stringstream.cons/stringstream.assign/move.pass.cpp @@ -24,7 +24,7 @@ std::stringstream ss0(" 123 456 "); std::stringstream ss; ss = std::move(ss0); - assert(ss.rdbuf() != 0); + assert(ss.rdbuf() != nullptr); assert(ss.good()); assert(ss.str() == " 123 456 "); int i = 0; @@ -40,7 +40,7 @@ std::wstringstream ss0(L" 123 456 "); std::wstringstream ss; ss = std::move(ss0); - assert(ss.rdbuf() != 0); + assert(ss.rdbuf() != nullptr); assert(ss.good()); assert(ss.str() == L" 123 456 "); int i = 0; Index: libcxx/test/std/input.output/string.streams/stringstream.cons/stringstream.assign/nonmember_swap.pass.cpp =================================================================== --- libcxx/test/std/input.output/string.streams/stringstream.cons/stringstream.assign/nonmember_swap.pass.cpp +++ libcxx/test/std/input.output/string.streams/stringstream.cons/stringstream.assign/nonmember_swap.pass.cpp @@ -27,7 +27,7 @@ std::stringstream ss0(" 123 456 "); std::stringstream ss; swap(ss, ss0); - assert(ss.rdbuf() != 0); + assert(ss.rdbuf() != nullptr); assert(ss.good()); assert(ss.str() == " 123 456 "); int i = 0; @@ -45,7 +45,7 @@ std::wstringstream ss0(L" 123 456 "); std::wstringstream ss; swap(ss, ss0); - assert(ss.rdbuf() != 0); + assert(ss.rdbuf() != nullptr); assert(ss.good()); assert(ss.str() == L" 123 456 "); int i = 0; Index: libcxx/test/std/input.output/string.streams/stringstream.members/str.pass.cpp =================================================================== --- libcxx/test/std/input.output/string.streams/stringstream.members/str.pass.cpp +++ libcxx/test/std/input.output/string.streams/stringstream.members/str.pass.cpp @@ -22,7 +22,7 @@ { { std::stringstream ss(" 123 456 "); - assert(ss.rdbuf() != 0); + assert(ss.rdbuf() != nullptr); assert(ss.good()); assert(ss.str() == " 123 456 "); int i = 0; @@ -43,7 +43,7 @@ #ifndef TEST_HAS_NO_WIDE_CHARACTERS { std::wstringstream ss(L" 123 456 "); - assert(ss.rdbuf() != 0); + assert(ss.rdbuf() != nullptr); assert(ss.good()); assert(ss.str() == L" 123 456 "); int i = 0; Index: libcxx/test/std/iterators/iterator.primitives/iterator.traits/empty.pass.cpp =================================================================== --- libcxx/test/std/iterators/iterator.primitives/iterator.traits/empty.pass.cpp +++ libcxx/test/std/iterators/iterator.primitives/iterator.traits/empty.pass.cpp @@ -27,7 +27,7 @@ private: struct two {char lx; char lxx;}; template static two test(...); - template static char test(typename U::value_type* = 0); + template static char test(typename U::value_type* = nullptr); public: static const bool value = sizeof(test(0)) == 1; }; Index: libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t.pass.cpp =================================================================== --- libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t.pass.cpp +++ libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t.pass.cpp @@ -36,7 +36,7 @@ void my_new_handler() { ++new_handler_called; - std::set_new_handler(0); + std::set_new_handler(nullptr); } int A_constructed = 0; Index: libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow.pass.cpp =================================================================== --- libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow.pass.cpp +++ libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow.pass.cpp @@ -36,7 +36,7 @@ void my_new_handler() { ++new_handler_called; - std::set_new_handler(0); + std::set_new_handler(nullptr); } int A_constructed = 0; @@ -54,7 +54,7 @@ std::align_val_t(OverAligned), std::nothrow); assert(new_handler_called == 1); - assert(vp == 0); + assert(vp == nullptr); }; #ifndef TEST_HAS_NO_EXCEPTIONS try Index: libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_array.pass.cpp =================================================================== --- libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_array.pass.cpp +++ libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_array.pass.cpp @@ -23,7 +23,7 @@ void my_new_handler() { ++new_handler_called; - std::set_new_handler(0); + std::set_new_handler(nullptr); } int A_constructed = 0; Index: libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_array_nothrow.pass.cpp =================================================================== --- libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_array_nothrow.pass.cpp +++ libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_array_nothrow.pass.cpp @@ -23,7 +23,7 @@ void my_new_handler() { ++new_handler_called; - std::set_new_handler(0); + std::set_new_handler(nullptr); } int A_constructed = 0; @@ -45,7 +45,7 @@ void* vp = operator new [] (std::numeric_limits::max(), std::nothrow); DoNotOptimize(vp); assert(new_handler_called == 1); - assert(vp == 0); + assert(vp == nullptr); } #ifndef TEST_HAS_NO_EXCEPTIONS catch (...) Index: libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new.pass.cpp =================================================================== --- libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new.pass.cpp +++ libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new.pass.cpp @@ -23,7 +23,7 @@ void my_new_handler() { ++new_handler_called; - std::set_new_handler(0); + std::set_new_handler(nullptr); } bool A_constructed = false; Index: libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t.pass.cpp =================================================================== --- libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t.pass.cpp +++ libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t.pass.cpp @@ -36,7 +36,7 @@ void my_new_handler() { ++new_handler_called; - std::set_new_handler(0); + std::set_new_handler(nullptr); } bool A_constructed = false; Index: libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow.pass.cpp =================================================================== --- libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow.pass.cpp +++ libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow.pass.cpp @@ -36,7 +36,7 @@ void my_new_handler() { ++new_handler_called; - std::set_new_handler(0); + std::set_new_handler(nullptr); } bool A_constructed = false; @@ -54,7 +54,7 @@ std::align_val_t(OverAligned), std::nothrow); assert(new_handler_called == 1); - assert(vp == 0); + assert(vp == nullptr); }; #ifndef TEST_HAS_NO_EXCEPTIONS try Index: libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_nothrow.pass.cpp =================================================================== --- libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_nothrow.pass.cpp +++ libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_nothrow.pass.cpp @@ -23,7 +23,7 @@ void my_new_handler() { ++new_handler_called; - std::set_new_handler(0); + std::set_new_handler(nullptr); } bool A_constructed = false; @@ -43,7 +43,7 @@ { void* vp = operator new (std::numeric_limits::max(), std::nothrow); assert(new_handler_called == 1); - assert(vp == 0); + assert(vp == nullptr); } #ifndef TEST_HAS_NO_EXCEPTIONS catch (...) Index: libcxx/test/std/language.support/support.runtime/cstdlib.pass.cpp =================================================================== --- libcxx/test/std/language.support/support.runtime/cstdlib.pass.cpp +++ libcxx/test/std/language.support/support.runtime/cstdlib.pass.cpp @@ -111,11 +111,11 @@ // std::aligned_alloc tested in cstdlib.aligned_alloc.compile.pass.cpp - void* pv = 0; - void (*handler)() = 0; - int (*comp)(void const*, void const*) = 0; + void* pv = nullptr; + void (*handler)() = nullptr; + int (*comp)(void const*, void const*) = nullptr; static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); Index: libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_en_US.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_en_US.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_en_US.pass.cpp @@ -49,7 +49,7 @@ int main(int, char**) { - std::ios ios(0); + std::ios ios(nullptr); std::string loc_name(LOCALE_en_US_UTF_8); ios.imbue(std::locale(ios.getloc(), new std::moneypunct_byname(loc_name))); Index: libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_fr_FR.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_fr_FR.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_fr_FR.pass.cpp @@ -60,7 +60,7 @@ int main(int, char**) { - std::ios ios(0); + std::ios ios(nullptr); std::string loc_name(LOCALE_fr_FR_UTF_8); ios.imbue(std::locale(ios.getloc(), new std::moneypunct_byname(loc_name))); Index: libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_ru_RU.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_ru_RU.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_ru_RU.pass.cpp @@ -58,7 +58,7 @@ int main(int, char**) { - std::ios ios(0); + std::ios ios(nullptr); std::string loc_name(LOCALE_ru_RU_UTF_8); ios.imbue(std::locale(ios.getloc(), new std::moneypunct_byname(loc_name))); Index: libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_zh_CN.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_zh_CN.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_zh_CN.pass.cpp @@ -55,7 +55,7 @@ int main(int, char**) { - std::ios ios(0); + std::ios ios(nullptr); std::string loc_name(LOCALE_zh_CN_UTF_8); ios.imbue(std::locale(ios.getloc(), new std::moneypunct_byname(loc_name))); Index: libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_string_en_US.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_string_en_US.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_string_en_US.pass.cpp @@ -49,7 +49,7 @@ int main(int, char**) { - std::ios ios(0); + std::ios ios(nullptr); std::string loc_name(LOCALE_en_US_UTF_8); ios.imbue(std::locale(ios.getloc(), new std::moneypunct_byname(loc_name))); Index: libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_en_US.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_en_US.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_en_US.pass.cpp @@ -48,7 +48,7 @@ int main(int, char**) { - std::ios ios(0); + std::ios ios(nullptr); std::string loc_name(LOCALE_en_US_UTF_8); ios.imbue(std::locale(ios.getloc(), new std::moneypunct_byname(loc_name))); Index: libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_fr_FR.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_fr_FR.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_fr_FR.pass.cpp @@ -60,7 +60,7 @@ int main(int, char**) { - std::ios ios(0); + std::ios ios(nullptr); std::string loc_name(LOCALE_fr_FR_UTF_8); ios.imbue(std::locale(ios.getloc(), new std::moneypunct_byname(loc_name))); Index: libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_ru_RU.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_ru_RU.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_ru_RU.pass.cpp @@ -58,7 +58,7 @@ int main(int, char**) { - std::ios ios(0); + std::ios ios(nullptr); std::string loc_name(LOCALE_ru_RU_UTF_8); ios.imbue(std::locale(ios.getloc(), new std::moneypunct_byname(loc_name))); Index: libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_zh_CN.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_zh_CN.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_zh_CN.pass.cpp @@ -55,7 +55,7 @@ int main(int, char**) { - std::ios ios(0); + std::ios ios(nullptr); std::string loc_name(LOCALE_zh_CN_UTF_8); ios.imbue(std::locale(ios.getloc(), new std::moneypunct_byname(loc_name))); Index: libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_string_en_US.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_string_en_US.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_string_en_US.pass.cpp @@ -48,7 +48,7 @@ int main(int, char**) { - std::ios ios(0); + std::ios ios(nullptr); std::string loc_name(LOCALE_en_US_UTF_8); ios.imbue(std::locale(ios.getloc(), new std::moneypunct_byname(loc_name))); Index: libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_bool.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_bool.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_bool.pass.cpp @@ -44,7 +44,7 @@ { const my_facet f(1); { - std::ios ios(0); + std::ios ios(nullptr); { bool v = false; char str[50]; @@ -61,7 +61,7 @@ } } { - std::ios ios(0); + std::ios ios(nullptr); std::boolalpha(ios); { bool v = false; @@ -79,7 +79,7 @@ } } { - std::ios ios(0); + std::ios ios(nullptr); std::boolalpha(ios); ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); { Index: libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_double.hex.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_double.hex.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_double.hex.pass.cpp @@ -57,7 +57,7 @@ const my_facet f(1); { double v = -0.; - std::ios ios(0); + std::ios ios(nullptr); std::hexfloat(ios); // %a { @@ -1846,7 +1846,7 @@ const my_facet f(1); { double v = 1234567890.125; - std::ios ios(0); + std::ios ios(nullptr); std::hexfloat(ios); // %a { Index: libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_double.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_double.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_double.pass.cpp @@ -52,7 +52,7 @@ const my_facet f(1); { double v = +0.; - std::ios ios(0); + std::ios ios(nullptr); // %g { ios.precision(0); @@ -3012,7 +3012,7 @@ const my_facet f(1); { double v = 1234567890.125; - std::ios ios(0); + std::ios ios(nullptr); // %g { ios.precision(0); @@ -5972,7 +5972,7 @@ const my_facet f(1); { double v = +0.; - std::ios ios(0); + std::ios ios(nullptr); std::fixed(ios); // %f { @@ -8933,7 +8933,7 @@ const my_facet f(1); { double v = 1234567890.125; - std::ios ios(0); + std::ios ios(nullptr); std::fixed(ios); // %f { @@ -10720,7 +10720,7 @@ const my_facet f(1); { double v = -0.; - std::ios ios(0); + std::ios ios(nullptr); std::scientific(ios); // %e { @@ -12509,7 +12509,7 @@ const my_facet f(1); { double v = 1234567890.125; - std::ios ios(0); + std::ios ios(nullptr); std::scientific(ios); // %e { Index: libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long.pass.cpp @@ -44,7 +44,7 @@ { const my_facet f(1); { - std::ios ios(0); + std::ios ios(nullptr); long v = 0; char str[50]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); @@ -52,7 +52,7 @@ assert(ex == "0"); } { - std::ios ios(0); + std::ios ios(nullptr); long v = 1; char str[50]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); @@ -60,7 +60,7 @@ assert(ex == "1"); } { - std::ios ios(0); + std::ios ios(nullptr); long v = -1; char str[50]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); @@ -68,7 +68,7 @@ assert(ex == "-1"); } { - std::ios ios(0); + std::ios ios(nullptr); long v = -1000; char str[50]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); @@ -76,7 +76,7 @@ assert(ex == "-1000"); } { - std::ios ios(0); + std::ios ios(nullptr); long v = 1000; char str[50]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); @@ -84,7 +84,7 @@ assert(ex == "1000"); } { - std::ios ios(0); + std::ios ios(nullptr); std::showpos(ios); long v = 1000; char str[50]; @@ -93,7 +93,7 @@ assert(ex == "+1000"); } { - std::ios ios(0); + std::ios ios(nullptr); std::oct(ios); long v = 1000; char str[50]; @@ -102,7 +102,7 @@ assert(ex == "1750"); } { - std::ios ios(0); + std::ios ios(nullptr); std::oct(ios); std::showbase(ios); long v = 1000; @@ -112,7 +112,7 @@ assert(ex == "01750"); } { - std::ios ios(0); + std::ios ios(nullptr); std::hex(ios); long v = 1000; char str[50]; @@ -121,7 +121,7 @@ assert(ex == "3e8"); } { - std::ios ios(0); + std::ios ios(nullptr); std::hex(ios); std::showbase(ios); long v = 1000; @@ -131,7 +131,7 @@ assert(ex == "0x3e8"); } { - std::ios ios(0); + std::ios ios(nullptr); std::hex(ios); std::showbase(ios); std::uppercase(ios); @@ -142,7 +142,7 @@ assert(ex == "0X3E8"); } { - std::ios ios(0); + std::ios ios(nullptr); ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); std::hex(ios); std::showbase(ios); @@ -154,7 +154,7 @@ assert(ex == "0X3E_8"); } { - std::ios ios(0); + std::ios ios(nullptr); ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); std::hex(ios); std::showbase(ios); @@ -165,7 +165,7 @@ assert(ex == "0x7f_fff_ff_f"); } { - std::ios ios(0); + std::ios ios(nullptr); ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); std::oct(ios); long v = 0123467; @@ -175,7 +175,7 @@ assert(ex == "123_46_7"); } { - std::ios ios(0); + std::ios ios(nullptr); ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); std::oct(ios); std::showbase(ios); @@ -186,7 +186,7 @@ assert(ex == "0_123_46_7"); } { - std::ios ios(0); + std::ios ios(nullptr); ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); std::oct(ios); std::showbase(ios); @@ -199,7 +199,7 @@ assert(ex == "*****0_123_46_7"); } { - std::ios ios(0); + std::ios ios(nullptr); ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); std::oct(ios); std::showbase(ios); @@ -212,7 +212,7 @@ assert(ex == "0_123_46_7*****"); } { - std::ios ios(0); + std::ios ios(nullptr); ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); std::oct(ios); std::showbase(ios); @@ -226,7 +226,7 @@ assert(ios.width() == 0); } { - std::ios ios(0); + std::ios ios(nullptr); ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); std::hex(ios); std::showbase(ios); @@ -239,7 +239,7 @@ assert(ex == "**0x7f_fff_ff_f"); } { - std::ios ios(0); + std::ios ios(nullptr); ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); std::hex(ios); std::showbase(ios); @@ -252,7 +252,7 @@ assert(ex == "0x7f_fff_ff_f**"); } { - std::ios ios(0); + std::ios ios(nullptr); ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); std::hex(ios); std::showbase(ios); @@ -266,7 +266,7 @@ assert(ios.width() == 0); } { - std::ios ios(0); + std::ios ios(nullptr); ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); std::showpos(ios); long v = 1000; @@ -279,7 +279,7 @@ assert(ios.width() == 0); } { - std::ios ios(0); + std::ios ios(nullptr); ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); std::showpos(ios); long v = 1000; @@ -292,7 +292,7 @@ assert(ios.width() == 0); } { - std::ios ios(0); + std::ios ios(nullptr); ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); std::showpos(ios); long v = 1000; @@ -305,7 +305,7 @@ assert(ios.width() == 0); } { - std::ios ios(0); + std::ios ios(nullptr); ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); long v = -1000; std::right(ios); @@ -318,7 +318,7 @@ assert(ios.width() == 0); } { - std::ios ios(0); + std::ios ios(nullptr); ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); long v = -1000; std::left(ios); @@ -330,7 +330,7 @@ assert(ios.width() == 0); } { - std::ios ios(0); + std::ios ios(nullptr); ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); long v = -1000; std::internal(ios); Index: libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.hex.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.hex.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.hex.pass.cpp @@ -57,7 +57,7 @@ const my_facet f(1); { long double v = -0.; - std::ios ios(0); + std::ios ios(nullptr); std::hexfloat(ios); // %a { @@ -1851,7 +1851,7 @@ char str[200]; { long double v = 1234567890.125; - std::ios ios(0); + std::ios ios(nullptr); std::hexfloat(ios); // %a { Index: libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.pass.cpp @@ -52,7 +52,7 @@ const my_facet f(1); { long double v = +0.; - std::ios ios(0); + std::ios ios(nullptr); // %g { ios.precision(0); @@ -3012,7 +3012,7 @@ const my_facet f(1); { long double v = -0.; - std::ios ios(0); + std::ios ios(nullptr); // %g { ios.precision(0); @@ -5972,7 +5972,7 @@ const my_facet f(1); { long double v = 1234567890.125; - std::ios ios(0); + std::ios ios(nullptr); // %g { ios.precision(0); @@ -8938,7 +8938,7 @@ const my_facet f(1); { long double v = -INFINITY; - std::ios ios(0); + std::ios ios(nullptr); // %g { ios.precision(0); @@ -10742,7 +10742,7 @@ #endif { long double v = std::nan(""); - std::ios ios(0); + std::ios ios(nullptr); // %g { ios.precision(0); @@ -11354,7 +11354,7 @@ const my_facet f(1); { long double v = +0.; - std::ios ios(0); + std::ios ios(nullptr); std::fixed(ios); // %f { @@ -14315,7 +14315,7 @@ const my_facet f(1); { long double v = -0.; - std::ios ios(0); + std::ios ios(nullptr); std::fixed(ios); // %f { @@ -17276,7 +17276,7 @@ const my_facet f(1); { long double v = 1234567890.125; - std::ios ios(0); + std::ios ios(nullptr); std::fixed(ios); // %f { @@ -19063,7 +19063,7 @@ const my_facet f(1); { long double v = -0.; - std::ios ios(0); + std::ios ios(nullptr); std::scientific(ios); // %e { @@ -20852,7 +20852,7 @@ const my_facet f(1); { long double v = 1234567890.125; - std::ios ios(0); + std::ios ios(nullptr); std::scientific(ios); // %e { Index: libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_long.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_long.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_long.pass.cpp @@ -44,7 +44,7 @@ { const my_facet f(1); { - std::ios ios(0); + std::ios ios(nullptr); long long v = 0; char str[50]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); @@ -52,7 +52,7 @@ assert(ex == "0"); } { - std::ios ios(0); + std::ios ios(nullptr); long long v = 1; char str[50]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); @@ -60,7 +60,7 @@ assert(ex == "1"); } { - std::ios ios(0); + std::ios ios(nullptr); long long v = -1; char str[50]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); @@ -68,7 +68,7 @@ assert(ex == "-1"); } { - std::ios ios(0); + std::ios ios(nullptr); long long v = -1000; char str[50]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); @@ -76,7 +76,7 @@ assert(ex == "-1000"); } { - std::ios ios(0); + std::ios ios(nullptr); long long v = 1000; char str[50]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); @@ -84,7 +84,7 @@ assert(ex == "1000"); } { - std::ios ios(0); + std::ios ios(nullptr); std::showpos(ios); long long v = 1000; char str[50]; @@ -93,7 +93,7 @@ assert(ex == "+1000"); } { - std::ios ios(0); + std::ios ios(nullptr); std::oct(ios); long long v = 1000; char str[50]; @@ -102,7 +102,7 @@ assert(ex == "1750"); } { - std::ios ios(0); + std::ios ios(nullptr); std::oct(ios); std::showbase(ios); long long v = 1000; @@ -112,7 +112,7 @@ assert(ex == "01750"); } { - std::ios ios(0); + std::ios ios(nullptr); std::hex(ios); long long v = 1000; char str[50]; @@ -121,7 +121,7 @@ assert(ex == "3e8"); } { - std::ios ios(0); + std::ios ios(nullptr); std::hex(ios); std::showbase(ios); long long v = 1000; @@ -131,7 +131,7 @@ assert(ex == "0x3e8"); } { - std::ios ios(0); + std::ios ios(nullptr); std::hex(ios); std::showbase(ios); std::uppercase(ios); @@ -142,7 +142,7 @@ assert(ex == "0X3E8"); } { - std::ios ios(0); + std::ios ios(nullptr); ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); std::hex(ios); std::showbase(ios); @@ -154,7 +154,7 @@ assert(ex == "0X3E_8"); } { - std::ios ios(0); + std::ios ios(nullptr); ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); std::hex(ios); std::showbase(ios); @@ -165,7 +165,7 @@ assert(ex == "0x7f_fff_ff_f"); } { - std::ios ios(0); + std::ios ios(nullptr); ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); std::oct(ios); long long v = 0123467; @@ -175,7 +175,7 @@ assert(ex == "123_46_7"); } { - std::ios ios(0); + std::ios ios(nullptr); ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); std::oct(ios); std::showbase(ios); @@ -186,7 +186,7 @@ assert(ex == "0_123_46_7"); } { - std::ios ios(0); + std::ios ios(nullptr); ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); std::oct(ios); std::showbase(ios); @@ -199,7 +199,7 @@ assert(ex == "*****0_123_46_7"); } { - std::ios ios(0); + std::ios ios(nullptr); ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); std::oct(ios); std::showbase(ios); @@ -212,7 +212,7 @@ assert(ex == "0_123_46_7*****"); } { - std::ios ios(0); + std::ios ios(nullptr); ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); std::oct(ios); std::showbase(ios); @@ -226,7 +226,7 @@ assert(ios.width() == 0); } { - std::ios ios(0); + std::ios ios(nullptr); ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); std::hex(ios); std::showbase(ios); @@ -239,7 +239,7 @@ assert(ex == "**0x7f_fff_ff_f"); } { - std::ios ios(0); + std::ios ios(nullptr); ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); std::hex(ios); std::showbase(ios); @@ -252,7 +252,7 @@ assert(ex == "0x7f_fff_ff_f**"); } { - std::ios ios(0); + std::ios ios(nullptr); ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); std::hex(ios); std::showbase(ios); @@ -266,7 +266,7 @@ assert(ios.width() == 0); } { - std::ios ios(0); + std::ios ios(nullptr); ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); std::showpos(ios); long long v = 1000; @@ -279,7 +279,7 @@ assert(ios.width() == 0); } { - std::ios ios(0); + std::ios ios(nullptr); ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); std::showpos(ios); long long v = 1000; @@ -292,7 +292,7 @@ assert(ios.width() == 0); } { - std::ios ios(0); + std::ios ios(nullptr); ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); std::showpos(ios); long long v = 1000; @@ -305,7 +305,7 @@ assert(ios.width() == 0); } { - std::ios ios(0); + std::ios ios(nullptr); ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); long long v = -1000; std::right(ios); @@ -318,7 +318,7 @@ assert(ios.width() == 0); } { - std::ios ios(0); + std::ios ios(nullptr); ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); long long v = -1000; std::left(ios); @@ -330,7 +330,7 @@ assert(ios.width() == 0); } { - std::ios ios(0); + std::ios ios(nullptr); ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); long long v = -1000; std::internal(ios); Index: libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_pointer.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_pointer.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_pointer.pass.cpp @@ -33,7 +33,7 @@ { const my_facet f(1); { - std::ios ios(0); + std::ios ios(nullptr); void* v = 0; char str[50]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); Index: libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_unsigned_long.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_unsigned_long.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_unsigned_long.pass.cpp @@ -44,7 +44,7 @@ { const my_facet f(1); { - std::ios ios(0); + std::ios ios(nullptr); unsigned long v = 0; char str[50]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); @@ -52,7 +52,7 @@ assert(ex == "0"); } { - std::ios ios(0); + std::ios ios(nullptr); unsigned long v = 1; char str[50]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); @@ -60,7 +60,7 @@ assert(ex == "1"); } { - std::ios ios(0); + std::ios ios(nullptr); unsigned long v = static_cast(-1); char str[50]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); @@ -68,7 +68,7 @@ assert(ex == (sizeof(unsigned long) == 4 ? "4294967295" : "18446744073709551615")); } { - std::ios ios(0); + std::ios ios(nullptr); unsigned long v = static_cast(-1000); char str[50]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); @@ -76,7 +76,7 @@ assert(ex == (sizeof(unsigned long) == 4 ? "4294966296" : "18446744073709550616")); } { - std::ios ios(0); + std::ios ios(nullptr); unsigned long v = 1000; char str[50]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); @@ -84,7 +84,7 @@ assert(ex == "1000"); } { - std::ios ios(0); + std::ios ios(nullptr); std::showpos(ios); unsigned long v = 1000; char str[50]; @@ -93,7 +93,7 @@ assert(ex == "1000"); } { - std::ios ios(0); + std::ios ios(nullptr); std::oct(ios); unsigned long v = 1000; char str[50]; @@ -102,7 +102,7 @@ assert(ex == "1750"); } { - std::ios ios(0); + std::ios ios(nullptr); std::oct(ios); std::showbase(ios); unsigned long v = 1000; @@ -112,7 +112,7 @@ assert(ex == "01750"); } { - std::ios ios(0); + std::ios ios(nullptr); std::hex(ios); unsigned long v = 1000; char str[50]; @@ -121,7 +121,7 @@ assert(ex == "3e8"); } { - std::ios ios(0); + std::ios ios(nullptr); std::hex(ios); std::showbase(ios); unsigned long v = 1000; @@ -131,7 +131,7 @@ assert(ex == "0x3e8"); } { - std::ios ios(0); + std::ios ios(nullptr); std::hex(ios); std::showbase(ios); std::uppercase(ios); @@ -142,7 +142,7 @@ assert(ex == "0X3E8"); } { - std::ios ios(0); + std::ios ios(nullptr); ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); std::hex(ios); std::showbase(ios); @@ -154,7 +154,7 @@ assert(ex == "0X3E_8"); } { - std::ios ios(0); + std::ios ios(nullptr); ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); std::hex(ios); std::showbase(ios); @@ -165,7 +165,7 @@ assert(ex == "0x7f_fff_ff_f"); } { - std::ios ios(0); + std::ios ios(nullptr); ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); std::oct(ios); unsigned long v = 0123467; @@ -175,7 +175,7 @@ assert(ex == "123_46_7"); } { - std::ios ios(0); + std::ios ios(nullptr); ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); std::oct(ios); std::showbase(ios); @@ -186,7 +186,7 @@ assert(ex == "0_123_46_7"); } { - std::ios ios(0); + std::ios ios(nullptr); ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); std::oct(ios); std::showbase(ios); @@ -199,7 +199,7 @@ assert(ex == "*****0_123_46_7"); } { - std::ios ios(0); + std::ios ios(nullptr); ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); std::oct(ios); std::showbase(ios); @@ -212,7 +212,7 @@ assert(ex == "0_123_46_7*****"); } { - std::ios ios(0); + std::ios ios(nullptr); ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); std::oct(ios); std::showbase(ios); @@ -226,7 +226,7 @@ assert(ios.width() == 0); } { - std::ios ios(0); + std::ios ios(nullptr); ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); std::hex(ios); std::showbase(ios); @@ -239,7 +239,7 @@ assert(ex == "**0x7f_fff_ff_f"); } { - std::ios ios(0); + std::ios ios(nullptr); ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); std::hex(ios); std::showbase(ios); @@ -252,7 +252,7 @@ assert(ex == "0x7f_fff_ff_f**"); } { - std::ios ios(0); + std::ios ios(nullptr); ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); std::hex(ios); std::showbase(ios); @@ -266,7 +266,7 @@ assert(ios.width() == 0); } { - std::ios ios(0); + std::ios ios(nullptr); ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); std::showpos(ios); unsigned long v = 1000; @@ -279,7 +279,7 @@ assert(ios.width() == 0); } { - std::ios ios(0); + std::ios ios(nullptr); ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); std::showpos(ios); unsigned long v = 1000; @@ -292,7 +292,7 @@ assert(ios.width() == 0); } { - std::ios ios(0); + std::ios ios(nullptr); ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); std::showpos(ios); unsigned long v = 1000; @@ -305,7 +305,7 @@ assert(ios.width() == 0); } { - std::ios ios(0); + std::ios ios(nullptr); ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); unsigned long v = static_cast(-1000); std::right(ios); @@ -319,7 +319,7 @@ assert(ios.width() == 0); } { - std::ios ios(0); + std::ios ios(nullptr); ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); unsigned long v = static_cast(-1000); std::left(ios); @@ -332,7 +332,7 @@ assert(ios.width() == 0); } { - std::ios ios(0); + std::ios ios(nullptr); ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); unsigned long v = static_cast(-1000); std::internal(ios); Index: libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_unsigned_long_long.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_unsigned_long_long.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_unsigned_long_long.pass.cpp @@ -44,7 +44,7 @@ { const my_facet f(1); { - std::ios ios(0); + std::ios ios(nullptr); unsigned long long v = 0; char str[50]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); @@ -52,7 +52,7 @@ assert(ex == "0"); } { - std::ios ios(0); + std::ios ios(nullptr); unsigned long long v = 1; char str[50]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); @@ -60,7 +60,7 @@ assert(ex == "1"); } { - std::ios ios(0); + std::ios ios(nullptr); unsigned long long v = static_cast(-1); char str[50]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); @@ -68,7 +68,7 @@ assert(ex == "18446744073709551615"); } { - std::ios ios(0); + std::ios ios(nullptr); unsigned long long v = static_cast(-1000); char str[50]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); @@ -76,7 +76,7 @@ assert(ex == "18446744073709550616"); } { - std::ios ios(0); + std::ios ios(nullptr); unsigned long long v = 1000; char str[50]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); @@ -84,7 +84,7 @@ assert(ex == "1000"); } { - std::ios ios(0); + std::ios ios(nullptr); std::showpos(ios); unsigned long long v = 1000; char str[50]; @@ -93,7 +93,7 @@ assert(ex == "1000"); } { - std::ios ios(0); + std::ios ios(nullptr); std::oct(ios); unsigned long long v = 1000; char str[50]; @@ -102,7 +102,7 @@ assert(ex == "1750"); } { - std::ios ios(0); + std::ios ios(nullptr); std::oct(ios); std::showbase(ios); unsigned long long v = 1000; @@ -112,7 +112,7 @@ assert(ex == "01750"); } { - std::ios ios(0); + std::ios ios(nullptr); std::hex(ios); unsigned long long v = 1000; char str[50]; @@ -121,7 +121,7 @@ assert(ex == "3e8"); } { - std::ios ios(0); + std::ios ios(nullptr); std::hex(ios); std::showbase(ios); unsigned long long v = 1000; @@ -131,7 +131,7 @@ assert(ex == "0x3e8"); } { - std::ios ios(0); + std::ios ios(nullptr); std::hex(ios); std::showbase(ios); std::uppercase(ios); @@ -142,7 +142,7 @@ assert(ex == "0X3E8"); } { - std::ios ios(0); + std::ios ios(nullptr); ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); std::hex(ios); std::showbase(ios); @@ -154,7 +154,7 @@ assert(ex == "0X3E_8"); } { - std::ios ios(0); + std::ios ios(nullptr); ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); std::hex(ios); std::showbase(ios); @@ -165,7 +165,7 @@ assert(ex == "0x7f_fff_ff_f"); } { - std::ios ios(0); + std::ios ios(nullptr); ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); std::oct(ios); unsigned long long v = 0123467; @@ -175,7 +175,7 @@ assert(ex == "123_46_7"); } { - std::ios ios(0); + std::ios ios(nullptr); ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); std::oct(ios); std::showbase(ios); @@ -186,7 +186,7 @@ assert(ex == "0_123_46_7"); } { - std::ios ios(0); + std::ios ios(nullptr); ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); std::oct(ios); std::showbase(ios); @@ -199,7 +199,7 @@ assert(ex == "*****0_123_46_7"); } { - std::ios ios(0); + std::ios ios(nullptr); ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); std::oct(ios); std::showbase(ios); @@ -212,7 +212,7 @@ assert(ex == "0_123_46_7*****"); } { - std::ios ios(0); + std::ios ios(nullptr); ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); std::oct(ios); std::showbase(ios); @@ -226,7 +226,7 @@ assert(ios.width() == 0); } { - std::ios ios(0); + std::ios ios(nullptr); ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); std::hex(ios); std::showbase(ios); @@ -239,7 +239,7 @@ assert(ex == "**0x7f_fff_ff_f"); } { - std::ios ios(0); + std::ios ios(nullptr); ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); std::hex(ios); std::showbase(ios); @@ -252,7 +252,7 @@ assert(ex == "0x7f_fff_ff_f**"); } { - std::ios ios(0); + std::ios ios(nullptr); ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); std::hex(ios); std::showbase(ios); @@ -266,7 +266,7 @@ assert(ios.width() == 0); } { - std::ios ios(0); + std::ios ios(nullptr); ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); std::showpos(ios); unsigned long long v = 1000; @@ -279,7 +279,7 @@ assert(ios.width() == 0); } { - std::ios ios(0); + std::ios ios(nullptr); ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); std::showpos(ios); unsigned long long v = 1000; @@ -292,7 +292,7 @@ assert(ios.width() == 0); } { - std::ios ios(0); + std::ios ios(nullptr); ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); std::showpos(ios); unsigned long long v = 1000; @@ -305,7 +305,7 @@ assert(ios.width() == 0); } { - std::ios ios(0); + std::ios ios(nullptr); ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); unsigned long long v = static_cast(-1000); std::right(ios); @@ -318,7 +318,7 @@ assert(ios.width() == 0); } { - std::ios ios(0); + std::ios ios(nullptr); ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); unsigned long long v = static_cast(-1000); std::left(ios); @@ -330,7 +330,7 @@ assert(ios.width() == 0); } { - std::ios ios(0); + std::ios ios(nullptr); ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); unsigned long long v = static_cast(-1000); std::internal(ios); Index: libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_bool.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_bool.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_bool.pass.cpp @@ -55,7 +55,7 @@ int main(int, char**) { const my_facet f(1); - std::ios ios(0); + std::ios ios(nullptr); { const char str[] = "1"; std::ios_base::iostate err = ios.goodbit; Index: libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_double.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_double.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_double.pass.cpp @@ -47,7 +47,7 @@ int main(int, char**) { const my_facet f(1); - std::ios ios(0); + std::ios ios(nullptr); double v = -1; { const char str[] = "123"; Index: libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_float.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_float.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_float.pass.cpp @@ -36,7 +36,7 @@ int main(int, char**) { const my_facet f(1); - std::ios ios(0); + std::ios ios(nullptr); float v = -1; { const char str[] = "123"; Index: libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long.pass.cpp @@ -49,7 +49,7 @@ int main(int, char**) { const my_facet f(1); - std::ios ios(0); + std::ios ios(nullptr); long v = -1; const std::ios_base::fmtflags zf = static_cast(0); { Index: libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long_double.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long_double.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long_double.pass.cpp @@ -36,7 +36,7 @@ int main(int, char**) { const my_facet f(1); - std::ios ios(0); + std::ios ios(nullptr); long double v = -1; { const char str[] = "123"; Index: libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long_long.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long_long.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long_long.pass.cpp @@ -44,7 +44,7 @@ int main(int, char**) { const my_facet f(1); - std::ios ios(0); + std::ios ios(nullptr); long long v = -1; { const char str[] = "0"; Index: libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_pointer.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_pointer.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_pointer.pass.cpp @@ -33,7 +33,7 @@ int main(int, char**) { const my_facet f(1); - std::ios ios(0); + std::ios ios(nullptr); { const char str[] = "0x0"; std::ios_base::iostate err = ios.goodbit; Index: libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_unsigned_int.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_unsigned_int.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_unsigned_int.pass.cpp @@ -44,7 +44,7 @@ int main(int, char**) { const my_facet f(1); - std::ios ios(0); + std::ios ios(nullptr); unsigned int v = static_cast(-1); { const char str[] = "0"; Index: libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_unsigned_long.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_unsigned_long.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_unsigned_long.pass.cpp @@ -44,7 +44,7 @@ int main(int, char**) { const my_facet f(1); - std::ios ios(0); + std::ios ios(nullptr); unsigned long v = static_cast(-1); { const char str[] = "0"; Index: libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_unsigned_long_long.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_unsigned_long_long.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_unsigned_long_long.pass.cpp @@ -44,7 +44,7 @@ int main(int, char**) { const my_facet f(1); - std::ios ios(0); + std::ios ios(nullptr); unsigned long long v = static_cast(-1); { const char str[] = "0"; Index: libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_unsigned_short.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_unsigned_short.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_unsigned_short.pass.cpp @@ -44,7 +44,7 @@ int main(int, char**) { const my_facet f(1); - std::ios ios(0); + std::ios ios(nullptr); unsigned short v = static_cast(-1); { const char str[] = "0"; Index: libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/test_neg_one.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/test_neg_one.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/test_neg_one.pass.cpp @@ -46,7 +46,7 @@ template void test_neg_one() { const my_facet f(1); - std::ios ios(0); + std::ios ios(nullptr); T v = static_cast(42); { const char str[] = "-1"; @@ -77,7 +77,7 @@ void test_negate() { typedef typename std::make_signed::type SignedT; const my_facet f(1); - std::ios ios(0); + std::ios ios(nullptr); T v = 42; { T value = std::numeric_limits::max(); Index: libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_date.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_date.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_date.pass.cpp @@ -43,7 +43,7 @@ int main(int, char**) { - std::ios ios(0); + std::ios ios(nullptr); std::ios_base::iostate err; std::tm t; { Index: libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_date_wide.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_date_wide.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_date_wide.pass.cpp @@ -45,7 +45,7 @@ int main(int, char**) { - std::ios ios(0); + std::ios ios(nullptr); std::ios_base::iostate err; std::tm t; { Index: libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_monthname.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_monthname.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_monthname.pass.cpp @@ -41,7 +41,7 @@ int main(int, char**) { - std::ios ios(0); + std::ios ios(nullptr); std::ios_base::iostate err; std::tm t; { Index: libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_monthname_wide.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_monthname_wide.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_monthname_wide.pass.cpp @@ -51,7 +51,7 @@ int main(int, char**) { - std::ios ios(0); + std::ios ios(nullptr); std::ios_base::iostate err; std::tm t; { Index: libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_one.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_one.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_one.pass.cpp @@ -44,7 +44,7 @@ int main(int, char**) { - std::ios ios(0); + std::ios ios(nullptr); std::ios_base::iostate err; std::tm t; { Index: libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_one_wide.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_one_wide.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_one_wide.pass.cpp @@ -46,7 +46,7 @@ int main(int, char**) { - std::ios ios(0); + std::ios ios(nullptr); std::ios_base::iostate err; std::tm t; { Index: libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_time.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_time.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_time.pass.cpp @@ -41,7 +41,7 @@ int main(int, char**) { - std::ios ios(0); + std::ios ios(nullptr); std::ios_base::iostate err; std::tm t; { Index: libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_time_wide.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_time_wide.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_time_wide.pass.cpp @@ -43,7 +43,7 @@ int main(int, char**) { - std::ios ios(0); + std::ios ios(nullptr); std::ios_base::iostate err; std::tm t; { Index: libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_weekday.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_weekday.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_weekday.pass.cpp @@ -40,7 +40,7 @@ int main(int, char**) { - std::ios ios(0); + std::ios ios(nullptr); std::ios_base::iostate err; std::tm t; { Index: libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_weekday_wide.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_weekday_wide.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_weekday_wide.pass.cpp @@ -42,7 +42,7 @@ int main(int, char**) { - std::ios ios(0); + std::ios ios(nullptr); std::ios_base::iostate err; std::tm t; { Index: libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_year.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_year.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_year.pass.cpp @@ -40,7 +40,7 @@ int main(int, char**) { - std::ios ios(0); + std::ios ios(nullptr); std::ios_base::iostate err; std::tm t; { Index: libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_year_wide.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_year_wide.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_year_wide.pass.cpp @@ -42,7 +42,7 @@ int main(int, char**) { - std::ios ios(0); + std::ios ios(nullptr); std::ios_base::iostate err; std::tm t; { Index: libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_date.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_date.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_date.pass.cpp @@ -35,7 +35,7 @@ int main(int, char**) { const my_facet f(1); - std::ios ios(0); + std::ios ios(nullptr); std::ios_base::iostate err; std::tm t; { Index: libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_date_wide.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_date_wide.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_date_wide.pass.cpp @@ -37,7 +37,7 @@ int main(int, char**) { const my_facet f(1); - std::ios ios(0); + std::ios ios(nullptr); std::ios_base::iostate err; std::tm t; { Index: libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_many.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_many.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_many.pass.cpp @@ -35,7 +35,7 @@ int main(int, char**) { const my_facet f(1); - std::ios ios(0); + std::ios ios(nullptr); std::ios_base::iostate err; std::tm t; { Index: libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_monthname.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_monthname.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_monthname.pass.cpp @@ -34,7 +34,7 @@ int main(int, char**) { const my_facet f(1); - std::ios ios(0); + std::ios ios(nullptr); std::ios_base::iostate err; std::tm t; { Index: libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_monthname_wide.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_monthname_wide.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_monthname_wide.pass.cpp @@ -36,7 +36,7 @@ int main(int, char**) { const my_facet f(1); - std::ios ios(0); + std::ios ios(nullptr); std::ios_base::iostate err; std::tm t; { Index: libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_one.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_one.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_one.pass.cpp @@ -33,7 +33,7 @@ int main(int, char**) { const my_facet f(1); - std::ios ios(0); + std::ios ios(nullptr); std::ios_base::iostate err; std::tm t; { Index: libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_time.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_time.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_time.pass.cpp @@ -34,7 +34,7 @@ int main(int, char**) { const my_facet f(1); - std::ios ios(0); + std::ios ios(nullptr); std::ios_base::iostate err; std::tm t; { Index: libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_time_wide.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_time_wide.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_time_wide.pass.cpp @@ -36,7 +36,7 @@ int main(int, char**) { const my_facet f(1); - std::ios ios(0); + std::ios ios(nullptr); std::ios_base::iostate err; std::tm t; { Index: libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_weekday.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_weekday.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_weekday.pass.cpp @@ -34,7 +34,7 @@ int main(int, char**) { const my_facet f(1); - std::ios ios(0); + std::ios ios(nullptr); std::ios_base::iostate err; std::tm t; { Index: libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_weekday_wide.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_weekday_wide.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_weekday_wide.pass.cpp @@ -36,7 +36,7 @@ int main(int, char**) { const my_facet f(1); - std::ios ios(0); + std::ios ios(nullptr); std::ios_base::iostate err; std::tm t; { Index: libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_year.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_year.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_year.pass.cpp @@ -34,7 +34,7 @@ int main(int, char**) { const my_facet f(1); - std::ios ios(0); + std::ios ios(nullptr); std::ios_base::iostate err; std::tm t; { Index: libcxx/test/std/localization/locale.categories/category.time/locale.time.put.byname/put1.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.time/locale.time.put.byname/put1.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.time/locale.time.put.byname/put1.pass.cpp @@ -59,7 +59,7 @@ t.tm_wday = 6; t.tm_yday = -1; t.tm_isdst = 1; - std::ios ios(0); + std::ios ios(nullptr); { const my_facet f(LOCALE_en_US_UTF_8, 1); std::string pat("Today is %A which is abbreviated %a."); Index: libcxx/test/std/localization/locale.categories/category.time/locale.time.put/locale.time.put.members/put1.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.time/locale.time.put/locale.time.put.members/put1.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.time/locale.time.put/locale.time.put.members/put1.pass.cpp @@ -43,7 +43,7 @@ t.tm_wday = 6; t.tm_yday = -1; t.tm_isdst = 1; - std::ios ios(0); + std::ios ios(nullptr); { std::string pat("Today is %A which is abbreviated %a."); cpp17_output_iterator iter = Index: libcxx/test/std/localization/locale.categories/category.time/locale.time.put/locale.time.put.members/put2.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.time/locale.time.put/locale.time.put.members/put2.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.time/locale.time.put/locale.time.put.members/put2.pass.cpp @@ -42,7 +42,7 @@ t.tm_wday = 6; t.tm_yday = 121; t.tm_isdst = 1; - std::ios ios(0); + std::ios ios(nullptr); { cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', &t, 'A'); std::string ex(str, base(iter)); Index: libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/overflow.pass.cpp =================================================================== --- libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/overflow.pass.cpp +++ libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/overflow.pass.cpp @@ -71,7 +71,7 @@ { std::ostringstream out; test_buf f(out.rdbuf()); - f.pubsetbuf(0, 0); + f.pubsetbuf(nullptr, 0); assert(f.pbase() == 0); assert(f.pptr() == 0); assert(f.epptr() == 0); Index: libcxx/test/std/localization/locales/locale/locale.cons/char_pointer.pass.cpp =================================================================== --- libcxx/test/std/localization/locales/locale/locale.cons/char_pointer.pass.cpp +++ libcxx/test/std/localization/locales/locale/locale.cons/char_pointer.pass.cpp @@ -85,7 +85,7 @@ #ifndef TEST_HAS_NO_EXCEPTIONS try { - std::locale((const char*)0); + std::locale((const char*)nullptr); assert(false); } catch (std::runtime_error&) Index: libcxx/test/std/localization/locales/locale/locale.cons/locale_facetptr.pass.cpp =================================================================== --- libcxx/test/std/localization/locales/locale/locale.cons/locale_facetptr.pass.cpp +++ libcxx/test/std/localization/locales/locale/locale.cons/locale_facetptr.pass.cpp @@ -91,7 +91,7 @@ { std::locale loc; check(loc); - std::locale loc2(loc, (std::ctype*)0); + std::locale loc2(loc, (std::ctype*)nullptr); check(loc2); assert(loc == loc2); } Index: libcxx/test/std/numerics/c.math/cmath.pass.cpp =================================================================== --- libcxx/test/std/numerics/c.math/cmath.pass.cpp +++ libcxx/test/std/numerics/c.math/cmath.pass.cpp @@ -438,12 +438,12 @@ void test_modf() { - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), ""); double i; assert(std::modf(1., &i) == 0); } Index: libcxx/test/std/numerics/complex.number/cmplx.over/arg.pass.cpp =================================================================== --- libcxx/test/std/numerics/complex.number/cmplx.over/arg.pass.cpp +++ libcxx/test/std/numerics/complex.number/cmplx.over/arg.pass.cpp @@ -21,7 +21,7 @@ template void -test(T x, typename std::enable_if::value>::type* = 0) +test(T x, typename std::enable_if::value>::type* = nullptr) { static_assert((std::is_same::value), ""); assert(std::arg(x) == arg(std::complex(static_cast(x), 0))); @@ -29,7 +29,7 @@ template void -test(T x, typename std::enable_if::value>::type* = 0) +test(T x, typename std::enable_if::value>::type* = nullptr) { static_assert((std::is_same::value), ""); assert(std::arg(x) == arg(std::complex(x, 0))); Index: libcxx/test/std/numerics/complex.number/cmplx.over/conj.pass.cpp =================================================================== --- libcxx/test/std/numerics/complex.number/cmplx.over/conj.pass.cpp +++ libcxx/test/std/numerics/complex.number/cmplx.over/conj.pass.cpp @@ -24,7 +24,7 @@ template TEST_CONSTEXPR_CXX20 void -test(T x, typename std::enable_if::value>::type* = 0) +test(T x, typename std::enable_if::value>::type* = nullptr) { static_assert((std::is_same >::value), ""); assert(std::conj(x) == conj(std::complex(x, 0))); @@ -33,7 +33,7 @@ template TEST_CONSTEXPR_CXX20 void -test(T x, typename std::enable_if::value>::type* = 0) +test(T x, typename std::enable_if::value>::type* = nullptr) { static_assert((std::is_same >::value), ""); assert(std::conj(x) == conj(std::complex(x, 0))); @@ -43,7 +43,7 @@ TEST_CONSTEXPR_CXX20 void test(T x, typename std::enable_if::value && - !std::is_floating_point::value>::type* = 0) + !std::is_floating_point::value>::type* = nullptr) { static_assert((std::is_same >::value), ""); assert(std::conj(x) == conj(std::complex(x, 0))); Index: libcxx/test/std/numerics/complex.number/cmplx.over/imag.pass.cpp =================================================================== --- libcxx/test/std/numerics/complex.number/cmplx.over/imag.pass.cpp +++ libcxx/test/std/numerics/complex.number/cmplx.over/imag.pass.cpp @@ -21,7 +21,7 @@ template void -test(typename std::enable_if::value>::type* = 0) +test(typename std::enable_if::value>::type* = nullptr) { static_assert((std::is_same::value), ""); assert(std::imag(x) == 0); @@ -35,7 +35,7 @@ template void -test(typename std::enable_if::value>::type* = 0) +test(typename std::enable_if::value>::type* = nullptr) { static_assert((std::is_same::value), ""); assert(std::imag(x) == 0); Index: libcxx/test/std/numerics/complex.number/cmplx.over/norm.pass.cpp =================================================================== --- libcxx/test/std/numerics/complex.number/cmplx.over/norm.pass.cpp +++ libcxx/test/std/numerics/complex.number/cmplx.over/norm.pass.cpp @@ -22,7 +22,7 @@ template TEST_CONSTEXPR_CXX20 void -test(T x, typename std::enable_if::value>::type* = 0) +test(T x, typename std::enable_if::value>::type* = nullptr) { static_assert((std::is_same::value), ""); assert(std::norm(x) == norm(std::complex(static_cast(x), 0))); @@ -31,7 +31,7 @@ template TEST_CONSTEXPR_CXX20 void -test(T x, typename std::enable_if::value>::type* = 0) +test(T x, typename std::enable_if::value>::type* = nullptr) { static_assert((std::is_same::value), ""); assert(std::norm(x) == norm(std::complex(x, 0))); Index: libcxx/test/std/numerics/complex.number/cmplx.over/pow.pass.cpp =================================================================== --- libcxx/test/std/numerics/complex.number/cmplx.over/pow.pass.cpp +++ libcxx/test/std/numerics/complex.number/cmplx.over/pow.pass.cpp @@ -29,7 +29,7 @@ template double -promote(T, typename std::enable_if::value>::type* = 0); +promote(T, typename std::enable_if::value>::type* = nullptr); float promote(float); double promote(double); @@ -64,7 +64,7 @@ template void -test(typename std::enable_if::value>::type* = 0, typename std::enable_if::value>::type* = 0) +test(typename std::enable_if::value>::type* = nullptr, typename std::enable_if::value>::type* = nullptr) { test(T(3), std::complex(4, 5)); test(std::complex(3, 4), T(5)); @@ -72,7 +72,7 @@ template void -test(typename std::enable_if::value>::type* = 0, typename std::enable_if::value>::type* = 0) +test(typename std::enable_if::value>::type* = nullptr, typename std::enable_if::value>::type* = nullptr) { test(T(3), std::complex(4, 5)); test(std::complex(3, 4), U(5)); Index: libcxx/test/std/numerics/complex.number/cmplx.over/proj.pass.cpp =================================================================== --- libcxx/test/std/numerics/complex.number/cmplx.over/proj.pass.cpp +++ libcxx/test/std/numerics/complex.number/cmplx.over/proj.pass.cpp @@ -23,7 +23,7 @@ template void -test(T x, typename std::enable_if::value>::type* = 0) +test(T x, typename std::enable_if::value>::type* = nullptr) { static_assert((std::is_same >::value), ""); assert(std::proj(x) == proj(std::complex(x, 0))); @@ -31,7 +31,7 @@ template void -test(T x, typename std::enable_if::value>::type* = 0) +test(T x, typename std::enable_if::value>::type* = nullptr) { static_assert((std::is_same >::value), ""); assert(std::proj(x) == proj(std::complex(x, 0))); @@ -40,7 +40,7 @@ template void test(T x, typename std::enable_if::value && - !std::is_floating_point::value>::type* = 0) + !std::is_floating_point::value>::type* = nullptr) { static_assert((std::is_same >::value), ""); assert(std::proj(x) == proj(std::complex(x, 0))); Index: libcxx/test/std/numerics/complex.number/cmplx.over/real.pass.cpp =================================================================== --- libcxx/test/std/numerics/complex.number/cmplx.over/real.pass.cpp +++ libcxx/test/std/numerics/complex.number/cmplx.over/real.pass.cpp @@ -21,7 +21,7 @@ template void -test(typename std::enable_if::value>::type* = 0) +test(typename std::enable_if::value>::type* = nullptr) { static_assert((std::is_same::value), ""); assert(std::real(x) == x); @@ -35,7 +35,7 @@ template void -test(typename std::enable_if::value>::type* = 0) +test(typename std::enable_if::value>::type* = nullptr) { static_assert((std::is_same::value), ""); assert(std::real(x) == x); Index: libcxx/test/std/strings/c.strings/cstring.pass.cpp =================================================================== --- libcxx/test/std/strings/c.strings/cstring.pass.cpp +++ libcxx/test/std/strings/c.strings/cstring.pass.cpp @@ -23,10 +23,10 @@ // Functions we get directly from the C library (just check the signature) { std::size_t s = 0; - void* vp = 0; - const void* vpc = 0; - char* cp = 0; - const char* cpc = 0; + void* vp = nullptr; + const void* vpc = nullptr; + char* cp = nullptr; + const char* cpc = nullptr; ASSERT_SAME_TYPE(void*, decltype(std::memcpy(vp, vpc, s))); ASSERT_SAME_TYPE(void*, decltype(std::memmove(vp, vpc, s))); ASSERT_SAME_TYPE(char*, decltype(std::strcpy(cp, cpc))); Index: libcxx/test/std/strings/c.strings/cuchar.compile.pass.cpp =================================================================== --- libcxx/test/std/strings/c.strings/cuchar.compile.pass.cpp +++ libcxx/test/std/strings/c.strings/cuchar.compile.pass.cpp @@ -24,12 +24,12 @@ // __STDC_UTF_32__ may or may not be defined by the C standard library #if !defined(TEST_HAS_NO_C8RTOMB_MBRTOC8) -ASSERT_SAME_TYPE(size_t, decltype(std::mbrtoc8((char8_t*)0, (const char*)0, (size_t)0, (mbstate_t*)0))); -ASSERT_SAME_TYPE(size_t, decltype(std::c8rtomb((char*)0, (char8_t)0, (mbstate_t*)0))); +ASSERT_SAME_TYPE(size_t, decltype(std::mbrtoc8((char8_t*)nullptr, (const char*)nullptr, (size_t)0, (mbstate_t*)nullptr))); +ASSERT_SAME_TYPE(size_t, decltype(std::c8rtomb((char*)nullptr, (char8_t)0, (mbstate_t*)nullptr))); #endif -ASSERT_SAME_TYPE(size_t, decltype(std::mbrtoc16((char16_t*)0, (const char*)0, (size_t)0, (mbstate_t*)0))); -ASSERT_SAME_TYPE(size_t, decltype(std::c16rtomb((char*)0, (char16_t)0, (mbstate_t*)0))); +ASSERT_SAME_TYPE(size_t, decltype(std::mbrtoc16((char16_t*)nullptr, (const char*)nullptr, (size_t)0, (mbstate_t*)nullptr))); +ASSERT_SAME_TYPE(size_t, decltype(std::c16rtomb((char*)nullptr, (char16_t)0, (mbstate_t*)nullptr))); -ASSERT_SAME_TYPE(size_t, decltype(std::mbrtoc32((char32_t*)0, (const char*)0, (size_t)0, (mbstate_t*)0))); -ASSERT_SAME_TYPE(size_t, decltype(std::c16rtomb((char*)0, (char32_t)0, (mbstate_t*)0))); +ASSERT_SAME_TYPE(size_t, decltype(std::mbrtoc32((char32_t*)nullptr, (const char*)nullptr, (size_t)0, (mbstate_t*)nullptr))); +ASSERT_SAME_TYPE(size_t, decltype(std::c16rtomb((char*)nullptr, (char32_t)0, (mbstate_t*)nullptr))); Index: libcxx/test/std/strings/c.strings/cwchar.pass.cpp =================================================================== --- libcxx/test/std/strings/c.strings/cwchar.pass.cpp +++ libcxx/test/std/strings/c.strings/cwchar.pass.cpp @@ -115,8 +115,8 @@ ASSERT_SAME_TYPE(std::size_t, decltype(std::mbrlen("", s, &mb))); ASSERT_SAME_TYPE(std::size_t, decltype(std::mbrtowc(ws, "", s, &mb))); ASSERT_SAME_TYPE(std::size_t, decltype(std::wcrtomb(ns, L' ', &mb))); - ASSERT_SAME_TYPE(std::size_t, decltype(std::mbsrtowcs(ws, (const char**)0, s, &mb))); - ASSERT_SAME_TYPE(std::size_t, decltype(std::wcsrtombs(ns, (const wchar_t**)0, s, &mb))); + ASSERT_SAME_TYPE(std::size_t, decltype(std::mbsrtowcs(ws, (const char**)nullptr, s, &mb))); + ASSERT_SAME_TYPE(std::size_t, decltype(std::wcsrtombs(ns, (const wchar_t**)nullptr, s, &mb))); ASSERT_SAME_TYPE(std::wint_t, decltype(std::getwchar())); ASSERT_SAME_TYPE(int, decltype(std::vwscanf(L"", va))); Index: libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/allocate_size_hint.pass.cpp =================================================================== --- libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/allocate_size_hint.pass.cpp +++ libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/allocate_size_hint.pass.cpp @@ -27,7 +27,7 @@ typedef std::scoped_allocator_adaptor> A; A a; A1::allocate_called = false; - assert(a.allocate(10, (const void*)0) == (int*)10); + assert(a.allocate(10, (const void*)nullptr) == (int*)10); assert(A1::allocate_called == true); } { @@ -49,7 +49,7 @@ typedef std::scoped_allocator_adaptor> A; A a; A2::allocate_called = false; - assert(a.allocate(10, (const void*)0) == (int*)0); + assert(a.allocate(10, (const void*)nullptr) == (int*)nullptr); assert(A2::allocate_called == true); } { Index: libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/allocate_size_hint.verify.cpp =================================================================== --- libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/allocate_size_hint.verify.cpp +++ libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/allocate_size_hint.verify.cpp @@ -21,5 +21,5 @@ void f() { std::scoped_allocator_adaptor> a; - a.allocate(10, (const void*)0); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}} + a.allocate(10, (const void*)nullptr); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}} } Index: libcxx/test/std/utilities/function.objects/arithmetic.operations/transparent.pass.cpp =================================================================== --- libcxx/test/std/utilities/function.objects/arithmetic.operations/transparent.pass.cpp +++ libcxx/test/std/utilities/function.objects/arithmetic.operations/transparent.pass.cpp @@ -18,7 +18,7 @@ private: struct two {char lx; char lxx;}; template static two test(...); - template static char test(typename U::is_transparent* = 0); + template static char test(typename U::is_transparent* = nullptr); public: static const bool value = sizeof(test(0)) == 1; }; Index: libcxx/test/std/utilities/function.objects/bitwise.operations/transparent.pass.cpp =================================================================== --- libcxx/test/std/utilities/function.objects/bitwise.operations/transparent.pass.cpp +++ libcxx/test/std/utilities/function.objects/bitwise.operations/transparent.pass.cpp @@ -18,7 +18,7 @@ private: struct two {char lx; char lxx;}; template static two test(...); - template static char test(typename U::is_transparent* = 0); + template static char test(typename U::is_transparent* = nullptr); public: static const bool value = sizeof(test(0)) == 1; }; Index: libcxx/test/std/utilities/function.objects/comparisons/transparent.pass.cpp =================================================================== --- libcxx/test/std/utilities/function.objects/comparisons/transparent.pass.cpp +++ libcxx/test/std/utilities/function.objects/comparisons/transparent.pass.cpp @@ -18,7 +18,7 @@ private: struct two {char lx; char lxx;}; template static two test(...); - template static char test(typename U::is_transparent* = 0); + template static char test(typename U::is_transparent* = nullptr); public: static const bool value = sizeof(test(0)) == 1; }; Index: libcxx/test/std/utilities/function.objects/logical.operations/transparent.pass.cpp =================================================================== --- libcxx/test/std/utilities/function.objects/logical.operations/transparent.pass.cpp +++ libcxx/test/std/utilities/function.objects/logical.operations/transparent.pass.cpp @@ -18,7 +18,7 @@ private: struct two {char lx; char lxx;}; template static two test(...); - template static char test(typename U::is_transparent* = 0); + template static char test(typename U::is_transparent* = nullptr); public: static const bool value = sizeof(test(0)) == 1; }; Index: libcxx/test/std/utilities/function.objects/refwrap/weak_result.pass.cpp =================================================================== --- libcxx/test/std/utilities/function.objects/refwrap/weak_result.pass.cpp +++ libcxx/test/std/utilities/function.objects/refwrap/weak_result.pass.cpp @@ -69,7 +69,7 @@ private: struct two {char _; char __;}; template static two test(...); - template static char test(typename U::result_type* = 0); + template static char test(typename U::result_type* = nullptr); public: static const bool value = sizeof(test(0)) == 1; }; Index: libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/auto_ptr_Y.pass.cpp =================================================================== --- libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/auto_ptr_Y.pass.cpp +++ libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/auto_ptr_Y.pass.cpp @@ -55,7 +55,7 @@ assert(B::count == 1); assert(A::count == 1); assert(pB.use_count() == 1); - assert(pA.get() == 0); + assert(pA.get() == nullptr); assert(pB.get() == ptrA); } assert(B::count == 0); @@ -72,7 +72,7 @@ assert(B::count == 0); assert(A::count == 0); assert(pB.use_count() == 1); - assert(pA.get() == 0); + assert(pA.get() == nullptr); assert(pB.get() == ptrA); } assert(B::count == 0); @@ -89,7 +89,7 @@ assert(B::count == 1); assert(A::count == 1); assert(pB.use_count() == 1); - assert(pA.get() == 0); + assert(pA.get() == nullptr); assert(pB.get() == ptrA); } assert(B::count == 0); @@ -106,7 +106,7 @@ assert(B::count == 0); assert(A::count == 0); assert(pB.use_count() == 1); - assert(pA.get() == 0); + assert(pA.get() == nullptr); assert(pB.get() == ptrA); } assert(B::count == 0); Index: libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/shared_ptr_Y_rv.pass.cpp =================================================================== --- libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/shared_ptr_Y_rv.pass.cpp +++ libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/shared_ptr_Y_rv.pass.cpp @@ -56,7 +56,7 @@ assert(A::count == 1); assert(pB.use_count() == 1); assert(pA.use_count() == 0); - assert(pA.get() == 0); + assert(pA.get() == nullptr); assert(pB.get() == ptrA); } assert(pA.use_count() == 0); @@ -75,7 +75,7 @@ assert(A::count == 0); assert(pB.use_count() == 0); assert(pA.use_count() == 0); - assert(pA.get() == 0); + assert(pA.get() == nullptr); assert(pB.get() == ptrA); } assert(pA.use_count() == 0); @@ -94,7 +94,7 @@ assert(A::count == 1); assert(pB.use_count() == 1); assert(pA.use_count() == 0); - assert(pA.get() == 0); + assert(pA.get() == nullptr); assert(pB.get() == ptrA); } assert(pA.use_count() == 0); @@ -113,7 +113,7 @@ assert(A::count == 0); assert(pB.use_count() == 0); assert(pA.use_count() == 0); - assert(pA.get() == 0); + assert(pA.get() == nullptr); assert(pB.get() == ptrA); } assert(pA.use_count() == 0); Index: libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/shared_ptr_rv.pass.cpp =================================================================== --- libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/shared_ptr_rv.pass.cpp +++ libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/shared_ptr_rv.pass.cpp @@ -56,7 +56,7 @@ assert(A::count == 1); assert(pB.use_count() == 1); assert(pA.use_count() == 0); - assert(pA.get() == 0); + assert(pA.get() == nullptr); assert(pB.get() == ptrA); } assert(pA.use_count() == 0); @@ -75,7 +75,7 @@ assert(A::count == 0); assert(pB.use_count() == 0); assert(pA.use_count() == 0); - assert(pA.get() == 0); + assert(pA.get() == nullptr); assert(pB.get() == ptrA); } assert(pA.use_count() == 0); @@ -94,7 +94,7 @@ assert(A::count == 1); assert(pB.use_count() == 1); assert(pA.use_count() == 0); - assert(pA.get() == 0); + assert(pA.get() == nullptr); assert(pB.get() == ptrA); } assert(pA.use_count() == 0); @@ -113,7 +113,7 @@ assert(A::count == 0); assert(pB.use_count() == 0); assert(pA.use_count() == 0); - assert(pA.get() == 0); + assert(pA.get() == nullptr); assert(pB.get() == ptrA); } assert(pA.use_count() == 0); Index: libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/unique_ptr_Y.pass.cpp =================================================================== --- libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/unique_ptr_Y.pass.cpp +++ libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/unique_ptr_Y.pass.cpp @@ -76,7 +76,7 @@ assert(B::count == 1); assert(A::count == 1); assert(pB.use_count() == 1); - assert(pA.get() == 0); + assert(pA.get() == nullptr); assert(pB.get() == ptrA); } assert(B::count == 0); @@ -93,7 +93,7 @@ assert(B::count == 0); assert(A::count == 0); // assert(pB.use_count() == 1); // no longer true due to LWG 2415 - assert(pA.get() == 0); + assert(pA.get() == nullptr); assert(pB.get() == ptrA); } assert(B::count == 0); @@ -110,7 +110,7 @@ assert(B::count == 1); assert(A::count == 1); assert(pB.use_count() == 1); - assert(pA.get() == 0); + assert(pA.get() == nullptr); assert(pB.get() == ptrA); } assert(B::count == 0); @@ -127,7 +127,7 @@ assert(B::count == 0); assert(A::count == 0); // assert(pB.use_count() == 1); // no longer true due to LWG 2415 - assert(pA.get() == 0); + assert(pA.get() == nullptr); assert(pB.get() == ptrA); } assert(B::count == 0); @@ -156,7 +156,7 @@ assert(A::count == 8); assert(p.use_count() == 1); assert(p.get() == raw_ptr); - assert(ptr.get() == 0); + assert(ptr.get() == nullptr); } assert(A::count == 0); Index: libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.cast/dynamic_pointer_cast.pass.cpp =================================================================== --- libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.cast/dynamic_pointer_cast.pass.cpp +++ libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.cast/dynamic_pointer_cast.pass.cpp @@ -54,14 +54,14 @@ { const std::shared_ptr pB(new B); std::shared_ptr pA = std::dynamic_pointer_cast(pB); - assert(pA.get() == 0); + assert(pA.get() == nullptr); assert(pA.use_count() == 0); } #if TEST_STD_VER > 14 { const std::shared_ptr pB(new B[8]); std::shared_ptr pA = std::dynamic_pointer_cast(pB); - assert(pA.get() == 0); + assert(pA.get() == nullptr); assert(pA.use_count() == 0); } #endif // TEST_STD_VER > 14 Index: libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/auto_ptr.pass.cpp =================================================================== --- libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/auto_ptr.pass.cpp +++ libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/auto_ptr.pass.cpp @@ -55,7 +55,7 @@ assert(B::count == 1); assert(p.use_count() == 1); assert(p.get() == raw_ptr); - assert(ptr.get() == 0); + assert(ptr.get() == nullptr); } assert(A::count == 0); assert(globalMemCounter.checkOutstandingNewEq(0)); @@ -69,7 +69,7 @@ assert(B::count == 1); assert(p.use_count() == 1); assert(p.get() == raw_ptr); - assert(ptr.get() == 0); + assert(ptr.get() == nullptr); } assert(A::count == 0); assert(globalMemCounter.checkOutstandingNewEq(0)); Index: libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/default.pass.cpp =================================================================== --- libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/default.pass.cpp +++ libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/default.pass.cpp @@ -21,7 +21,7 @@ void test() { std::shared_ptr p; assert(p.use_count() == 0); - assert(p.get() == 0); + assert(p.get() == nullptr); } int main(int, char**) { Index: libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/nullptr_t.pass.cpp =================================================================== --- libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/nullptr_t.pass.cpp +++ libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/nullptr_t.pass.cpp @@ -20,13 +20,13 @@ { std::shared_ptr p(nullptr); assert(p.use_count() == 0); - assert(p.get() == 0); + assert(p.get() == nullptr); } { std::shared_ptr p(nullptr); assert(p.use_count() == 0); - assert(p.get() == 0); + assert(p.get() == nullptr); } return 0; Index: libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/nullptr_t_deleter.pass.cpp =================================================================== --- libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/nullptr_t_deleter.pass.cpp +++ libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/nullptr_t_deleter.pass.cpp @@ -34,7 +34,7 @@ std::shared_ptr p(nullptr, test_deleter(3)); assert(A::count == 0); assert(p.use_count() == 1); - assert(p.get() == 0); + assert(p.get() == nullptr); assert(test_deleter::count == 1); assert(test_deleter::dealloc_count == 0); #ifndef TEST_HAS_NO_RTTI Index: libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/nullptr_t_deleter_allocator.pass.cpp =================================================================== --- libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/nullptr_t_deleter_allocator.pass.cpp +++ libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/nullptr_t_deleter_allocator.pass.cpp @@ -35,7 +35,7 @@ std::shared_ptr p(nullptr, test_deleter(3), test_allocator(5, &alloc_stats)); assert(A::count == 0); assert(p.use_count() == 1); - assert(p.get() == 0); + assert(p.get() == nullptr); assert(test_deleter::count == 1); assert(test_deleter::dealloc_count == 0); #ifndef TEST_HAS_NO_RTTI @@ -58,7 +58,7 @@ std::shared_ptr p(nullptr, test_deleter(1), bare_allocator()); assert(A::count == 0); assert(p.use_count() == 1); - assert(p.get() == 0); + assert(p.get() == nullptr); assert(test_deleter::count ==1); assert(test_deleter::dealloc_count == 0); #ifndef TEST_HAS_NO_RTTI @@ -78,7 +78,7 @@ std::shared_ptr p(nullptr, test_deleter(1), min_allocator()); assert(A::count == 0); assert(p.use_count() == 1); - assert(p.get() == 0); + assert(p.get() == nullptr); assert(test_deleter::count ==1); assert(test_deleter::dealloc_count == 0); #ifndef TEST_HAS_NO_RTTI Index: libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/unique_ptr.pass.cpp =================================================================== --- libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/unique_ptr.pass.cpp +++ libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/unique_ptr.pass.cpp @@ -110,7 +110,7 @@ assert(B::count == 1); assert(p.use_count() == 1); assert(p.get() == raw_ptr); - assert(ptr.get() == 0); + assert(ptr.get() == nullptr); } { @@ -121,7 +121,7 @@ assert(B::count == 1); assert(p.use_count() == 1); assert(p.get() == raw_ptr); - assert(ptr.get() == 0); + assert(ptr.get() == nullptr); } #ifndef TEST_HAS_NO_EXCEPTIONS @@ -148,7 +148,7 @@ { std::unique_ptr ptr; std::shared_ptr p(std::move(ptr)); - assert(p.get() == 0); + assert(p.get() == nullptr); assert(p.use_count() == 0); } #endif @@ -198,7 +198,7 @@ assert(A::count == 8); assert(p.use_count() == 1); assert(p.get() == raw_ptr); - assert(ptr.get() == 0); + assert(ptr.get() == nullptr); } assert(A::count == 0); Index: libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.mod/reset.pass.cpp =================================================================== --- libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.mod/reset.pass.cpp +++ libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.mod/reset.pass.cpp @@ -48,7 +48,7 @@ assert(A::count == 0); assert(B::count == 0); assert(p.use_count() == 0); - assert(p.get() == 0); + assert(p.get() == nullptr); } assert(A::count == 0); { @@ -57,7 +57,7 @@ assert(A::count == 0); assert(B::count == 0); assert(p.use_count() == 0); - assert(p.get() == 0); + assert(p.get() == nullptr); } assert(A::count == 0); Index: libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.obs/lock.pass.cpp =================================================================== --- libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.obs/lock.pass.cpp +++ libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.obs/lock.pass.cpp @@ -34,7 +34,7 @@ std::weak_ptr wp; std::shared_ptr sp = wp.lock(); assert(sp.use_count() == 0); - assert(sp.get() == 0); + assert(sp.get() == nullptr); assert(A::count == 0); } { @@ -52,7 +52,7 @@ sp0.reset(); std::shared_ptr sp = wp.lock(); assert(sp.use_count() == 0); - assert(sp.get() == 0); + assert(sp.get() == nullptr); assert(A::count == 0); } assert(A::count == 0); Index: libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.asgn/move.pass.cpp =================================================================== --- libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.asgn/move.pass.cpp +++ libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.asgn/move.pass.cpp @@ -46,7 +46,7 @@ if (!TEST_IS_CONSTANT_EVALUATED) assert(A::count == expect_alive); assert(s2.get() == p); - assert(s1.get() == 0); + assert(s1.get() == nullptr); } if (!TEST_IS_CONSTANT_EVALUATED) assert(A::count == 0); @@ -59,7 +59,7 @@ assert(A::count == (expect_alive * 2)); s2 = std::move(s1); assert(s2.get() == p); - assert(s1.get() == 0); + assert(s1.get() == nullptr); if (!TEST_IS_CONSTANT_EVALUATED) assert(A::count == expect_alive); assert(s2.get_deleter().state() == 5); @@ -75,7 +75,7 @@ std::unique_ptr&> s2(newValue(expect_alive), d2); s2 = std::move(s1); assert(s2.get() == p); - assert(s1.get() == 0); + assert(s1.get() == nullptr); if (!TEST_IS_CONSTANT_EVALUATED) assert(A::count == expect_alive); assert(d1.state() == 5); Index: libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.asgn/move_convert.runtime.pass.cpp =================================================================== --- libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.asgn/move_convert.runtime.pass.cpp +++ libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.asgn/move_convert.runtime.pass.cpp @@ -27,7 +27,7 @@ assert(A::count == 2); aptr = std::move(bptr); assert(aptr.get() == p); - assert(bptr.get() == 0); + assert(bptr.get() == nullptr); assert(A::count == 1); assert(B::count == 1); } Index: libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.asgn/move_convert.single.pass.cpp =================================================================== --- libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.asgn/move_convert.single.pass.cpp +++ libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.asgn/move_convert.single.pass.cpp @@ -29,7 +29,7 @@ assert(A::count == 2); aptr = std::move(bptr); assert(aptr.get() == p); - assert(bptr.get() == 0); + assert(bptr.get() == nullptr); if (!TEST_IS_CONSTANT_EVALUATED) { assert(A::count == 1); assert(B::count == 1); Index: libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.asgn/null.pass.cpp =================================================================== --- libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.asgn/null.pass.cpp +++ libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.asgn/null.pass.cpp @@ -30,7 +30,7 @@ s2 = NULL; if (!TEST_IS_CONSTANT_EVALUATED) assert(A::count == 0); - assert(s2.get() == 0); + assert(s2.get() == nullptr); } if (!TEST_IS_CONSTANT_EVALUATED) assert(A::count == 0); Index: libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.asgn/nullptr.pass.cpp =================================================================== --- libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.asgn/nullptr.pass.cpp +++ libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.asgn/nullptr.pass.cpp @@ -31,7 +31,7 @@ s2 = nullptr; if (!TEST_IS_CONSTANT_EVALUATED) assert(A::count == 0); - assert(s2.get() == 0); + assert(s2.get() == nullptr); } if (!TEST_IS_CONSTANT_EVALUATED) assert(A::count == 0); Index: libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/auto_pointer.pass.cpp =================================================================== --- libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/auto_pointer.pass.cpp +++ libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/auto_pointer.pass.cpp @@ -68,7 +68,7 @@ std::auto_ptr ap(p); std::unique_ptr up(std::move(ap)); assert(up.get() == p); - assert(ap.get() == 0); + assert(ap.get() == nullptr); assert(A::count == 1); assert(B::count == 1); } @@ -80,7 +80,7 @@ std::unique_ptr up; up = std::move(ap); assert(up.get() == p); - assert(ap.get() == 0); + assert(ap.get() == nullptr); assert(A::count == 1); assert(B::count == 1); } Index: libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/default.pass.cpp =================================================================== --- libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/default.pass.cpp +++ libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/default.pass.cpp @@ -73,18 +73,18 @@ #endif { std::unique_ptr p; - assert(p.get() == 0); + assert(p.get() == nullptr); } { std::unique_ptr > p; - assert(p.get() == 0); + assert(p.get() == nullptr); assert(p.get_deleter().state() == 0); p.get_deleter().set_state(5); assert(p.get_deleter().state() == 5); } { std::unique_ptr > p; - assert(p.get() == 0); + assert(p.get() == nullptr); assert(p.get_deleter().state() == 0); } Index: libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/move.pass.cpp =================================================================== --- libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/move.pass.cpp +++ libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/move.pass.cpp @@ -90,7 +90,7 @@ A* p = s.get(); APtr s2 = std::move(s); assert(s2.get() == p); - assert(s.get() == 0); + assert(s.get() == nullptr); if (!TEST_IS_CONSTANT_EVALUATED) assert(A::count == expect_alive); } @@ -106,7 +106,7 @@ A* p = s.get(); APtr s2 = std::move(s); assert(s2.get() == p); - assert(s.get() == 0); + assert(s.get() == nullptr); if (!TEST_IS_CONSTANT_EVALUATED) assert(A::count == expect_alive); assert(s2.get_deleter().state() == 5); @@ -123,7 +123,7 @@ A* p = s.get(); APtr s2 = std::move(s); assert(s2.get() == p); - assert(s.get() == 0); + assert(s.get() == nullptr); if (!TEST_IS_CONSTANT_EVALUATED) assert(A::count == expect_alive); d.set_state(6); Index: libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/null.pass.cpp =================================================================== --- libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/null.pass.cpp +++ libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/null.pass.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 +// ADDITIONAL_COMPILE_FLAGS: -Wno-zero-as-null-pointer-constant // Index: libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/nullptr.pass.cpp =================================================================== --- libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/nullptr.pass.cpp +++ libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/nullptr.pass.cpp @@ -40,16 +40,16 @@ #endif { std::unique_ptr p(nullptr); - assert(p.get() == 0); + assert(p.get() == nullptr); } { std::unique_ptr > p(nullptr); - assert(p.get() == 0); + assert(p.get() == nullptr); assert(p.get_deleter().state() == 0); } { std::unique_ptr > p(nullptr); - assert(p.get() == 0); + assert(p.get() == nullptr); assert(p.get_deleter().state() == 0); } } Index: libcxx/test/std/utilities/utility/pairs/pairs.pair/ctor.const_first_const_second_cxx03.pass.cpp =================================================================== --- libcxx/test/std/utilities/utility/pairs/pairs.pair/ctor.const_first_const_second_cxx03.pass.cpp +++ libcxx/test/std/utilities/utility/pairs/pairs.pair/ctor.const_first_const_second_cxx03.pass.cpp @@ -30,7 +30,7 @@ { { typedef std::pair P; - P p(3.5f, 0); + P p(3.5f, nullptr); assert(p.first == 3.5f); assert(p.second == nullptr); } Index: libcxx/test/support/controlled_allocators.h =================================================================== --- libcxx/test/support/controlled_allocators.h +++ libcxx/test/support/controlled_allocators.h @@ -72,7 +72,7 @@ std::size_t last_size = 0; std::size_t last_align = 0; - void * last_pointer = 0; + void * last_pointer = nullptr; std::size_t last_alloc_size = 0; std::size_t last_alloc_align = 0; Index: libcxx/test/support/deleter_types.h =================================================================== --- libcxx/test/support/deleter_types.h +++ libcxx/test/support/deleter_types.h @@ -47,14 +47,14 @@ } template - TEST_CONSTEXPR_CXX23 Deleter(Deleter&& d, typename std::enable_if::value>::type* = 0) + TEST_CONSTEXPR_CXX23 Deleter(Deleter&& d, typename std::enable_if::value>::type* = nullptr) : state_(d.state()) { d.set_state(0); } private: template - Deleter(const Deleter& d, typename std::enable_if::value>::type* = 0); + Deleter(const Deleter& d, typename std::enable_if::value>::type* = nullptr); public: TEST_CONSTEXPR_CXX23 int state() const { return state_; } @@ -114,7 +114,7 @@ } template - Deleter(Deleter d, typename std::enable_if::value>::type* = 0) : state_(d.state()) {} + Deleter(Deleter d, typename std::enable_if::value>::type* = nullptr) : state_(d.state()) {} public: int state() const { return state_; } @@ -400,7 +400,7 @@ template TEST_CONSTEXPR_CXX23 - PointerDeleter(PointerDeleter&&, typename std::enable_if::value>::type* = 0) {} + PointerDeleter(PointerDeleter&&, typename std::enable_if::value>::type* = nullptr) {} TEST_CONSTEXPR_CXX23 void operator()(pointer p) { if (p) { @@ -410,7 +410,7 @@ private: template - PointerDeleter(const PointerDeleter&, typename std::enable_if::value>::type* = 0); + PointerDeleter(const PointerDeleter&, typename std::enable_if::value>::type* = nullptr); }; template @@ -428,7 +428,7 @@ template TEST_CONSTEXPR_CXX23 - PointerDeleter(PointerDeleter&&, typename std::enable_if::value>::type* = 0) {} + PointerDeleter(PointerDeleter&&, typename std::enable_if::value>::type* = nullptr) {} TEST_CONSTEXPR_CXX23 void operator()(pointer p) { if (p) { @@ -438,7 +438,7 @@ private: template - PointerDeleter(const PointerDeleter&, typename std::enable_if::value>::type* = 0); + PointerDeleter(const PointerDeleter&, typename std::enable_if::value>::type* = nullptr); }; #endif // TEST_STD_VER >= 11 Index: libcxx/test/support/make_string.h =================================================================== --- libcxx/test/support/make_string.h +++ libcxx/test/support/make_string.h @@ -44,7 +44,7 @@ Str, sizeof(Str) - 1 \ ) -#define MKSTR_LEN(CharT, Str) MKSTR(Str).length((const CharT*)0) +#define MKSTR_LEN(CharT, Str) MKSTR(Str).length((const CharT*)nullptr) struct MultiStringType { MKSTR_WCHAR_ONLY(const wchar_t* w_; size_t wn_; ) Index: libcxx/test/support/nasty_string.h =================================================================== --- libcxx/test/support/nasty_string.h +++ libcxx/test/support/nasty_string.h @@ -113,7 +113,7 @@ return s; ++s; } - return 0; + return nullptr; } constexpr nasty_char* nasty_char_traits::move(nasty_char* s1, const nasty_char* s2, size_t n) { Index: libcxx/utils/libcxx/test/dsl.py =================================================================== --- libcxx/utils/libcxx/test/dsl.py +++ libcxx/utils/libcxx/test/dsl.py @@ -253,7 +253,7 @@ #include int main(int argc, char** argv) { for (int i = 1; i < argc; i++) { - if (::setlocale(LC_ALL, argv[i]) != NULL) { + if (::setlocale(LC_ALL, argv[i]) != nullptr) { return 0; } } Index: libcxx/utils/libcxx/test/params.py =================================================================== --- libcxx/utils/libcxx/test/params.py +++ libcxx/utils/libcxx/test/params.py @@ -18,6 +18,7 @@ '-Wshadow', '-Wundef', '-Wunused-template', + '-Wzero-as-null-pointer-constant', '-Wno-unused-command-line-argument', '-Wno-attributes', '-Wno-pessimizing-move', Index: libunwind/test/forceunwind.pass.cpp =================================================================== --- libunwind/test/forceunwind.pass.cpp +++ libunwind/test/forceunwind.pass.cpp @@ -41,7 +41,7 @@ assert(exceptionObject == &ex); assert(stop_parameter == &foo); - Dl_info info = {0, 0, 0, 0}; + Dl_info info = {nullptr, nullptr, nullptr, nullptr}; // Unwind util the main is reached, above frames depend on the platform and // architecture. Index: libunwind/test/signal_unwind.pass.cpp =================================================================== --- libunwind/test/signal_unwind.pass.cpp +++ libunwind/test/signal_unwind.pass.cpp @@ -26,7 +26,7 @@ _Unwind_Reason_Code frame_handler(struct _Unwind_Context* ctx, void* arg) { (void)arg; - Dl_info info = { 0, 0, 0, 0 }; + Dl_info info = { nullptr, nullptr, nullptr, nullptr }; // Unwind util the main is reached, above frames depend on the platform and // architecture. @@ -39,7 +39,7 @@ void signal_handler(int signum) { (void)signum; - _Unwind_Backtrace(frame_handler, NULL); + _Unwind_Backtrace(frame_handler, nullptr); _Exit(-1); } Index: libunwind/test/unwind_leaffunction.pass.cpp =================================================================== --- libunwind/test/unwind_leaffunction.pass.cpp +++ libunwind/test/unwind_leaffunction.pass.cpp @@ -26,7 +26,7 @@ _Unwind_Reason_Code frame_handler(struct _Unwind_Context* ctx, void* arg) { (void)arg; - Dl_info info = { 0, 0, 0, 0 }; + Dl_info info = { nullptr, nullptr, nullptr, nullptr }; // Unwind until the main is reached, above frames deeped on the platform and // architecture. @@ -39,7 +39,7 @@ void signal_handler(int signum) { (void)signum; - _Unwind_Backtrace(frame_handler, NULL); + _Unwind_Backtrace(frame_handler, nullptr); _Exit(-1); }