@@ -3110,7 +3110,7 @@ public:
31103110 }
31113111 _LIBCPP_HIDE_FROM_ABI wide_string from_bytes (const char * __first, const char * __last);
31123112
3113- _LIBCPP_HIDE_FROM_ABI byte_string to_bytes (_Elem __wchar) { return to_bytes (& __wchar, & __wchar + 1 ); }
3113+ _LIBCPP_HIDE_FROM_ABI byte_string to_bytes (_Elem __wchar) { return to_bytes (std::addressof ( __wchar), std::addressof ( __wchar) + 1 ); }
31143114 _LIBCPP_HIDE_FROM_ABI byte_string to_bytes (const _Elem* __wptr) {
31153115 return to_bytes (__wptr, __wptr + char_traits<_Elem>::length (__wptr));
31163116 }
@@ -3172,7 +3172,7 @@ wstring_convert<_Codecvt, _Elem, _WideAlloc, _ByteAlloc>::from_bytes(const char*
31723172 codecvt_base::result __r = codecvt_base::ok;
31733173 state_type __st = __cvtstate_;
31743174 if (__frm != __frm_end) {
3175- _Elem* __to = & __ws[0 ];
3175+ _Elem* __to = std::addressof ( __ws[0 ]) ;
31763176 _Elem* __to_end = __to + __ws.size ();
31773177 const char * __frm_nxt;
31783178 do {
@@ -3182,19 +3182,19 @@ wstring_convert<_Codecvt, _Elem, _WideAlloc, _ByteAlloc>::from_bytes(const char*
31823182 if (__frm_nxt == __frm) {
31833183 __r = codecvt_base::error;
31843184 } else if (__r == codecvt_base::noconv) {
3185- __ws.resize (__to - & __ws[0 ]);
3185+ __ws.resize (__to - std::addressof ( __ws[0 ]) );
31863186 // This only gets executed if _Elem is char
31873187 __ws.append ((const _Elem*)__frm, (const _Elem*)__frm_end);
31883188 __frm = __frm_nxt;
31893189 __r = codecvt_base::ok;
31903190 } else if (__r == codecvt_base::ok) {
3191- __ws.resize (__to_nxt - & __ws[0 ]);
3191+ __ws.resize (__to_nxt - std::addressof ( __ws[0 ]) );
31923192 __frm = __frm_nxt;
31933193 } else if (__r == codecvt_base::partial) {
3194- ptrdiff_t __s = __to_nxt - & __ws[0 ];
3194+ ptrdiff_t __s = __to_nxt - std::addressof ( __ws[0 ]) ;
31953195 __ws.resize (2 * __s);
3196- __to = & __ws[0 ] + __s;
3197- __to_end = & __ws[0 ] + __ws.size ();
3196+ __to = std::addressof ( __ws[0 ]) + __s;
3197+ __to_end = std::addressof ( __ws[0 ]) + __ws.size ();
31983198 __frm = __frm_nxt;
31993199 }
32003200 } while (__r == codecvt_base::partial && __frm_nxt < __frm_end);
@@ -3220,7 +3220,7 @@ wstring_convert<_Codecvt, _Elem, _WideAlloc, _ByteAlloc>::to_bytes(const _Elem*
32203220 codecvt_base::result __r = codecvt_base::ok;
32213221 state_type __st = __cvtstate_;
32223222 if (__frm != __frm_end) {
3223- char * __to = & __bs[0 ];
3223+ char * __to = std::addressof ( __bs[0 ]) ;
32243224 char * __to_end = __to + __bs.size ();
32253225 const _Elem* __frm_nxt;
32263226 do {
@@ -3230,41 +3230,41 @@ wstring_convert<_Codecvt, _Elem, _WideAlloc, _ByteAlloc>::to_bytes(const _Elem*
32303230 if (__frm_nxt == __frm) {
32313231 __r = codecvt_base::error;
32323232 } else if (__r == codecvt_base::noconv) {
3233- __bs.resize (__to - & __bs[0 ]);
3233+ __bs.resize (__to - std::addressof ( __bs[0 ]) );
32343234 // This only gets executed if _Elem is char
32353235 __bs.append ((const char *)__frm, (const char *)__frm_end);
32363236 __frm = __frm_nxt;
32373237 __r = codecvt_base::ok;
32383238 } else if (__r == codecvt_base::ok) {
3239- __bs.resize (__to_nxt - & __bs[0 ]);
3239+ __bs.resize (__to_nxt - std::addressof ( __bs[0 ]) );
32403240 __frm = __frm_nxt;
32413241 } else if (__r == codecvt_base::partial) {
3242- ptrdiff_t __s = __to_nxt - & __bs[0 ];
3242+ ptrdiff_t __s = __to_nxt - std::addressof ( __bs[0 ]) ;
32433243 __bs.resize (2 * __s);
3244- __to = & __bs[0 ] + __s;
3245- __to_end = & __bs[0 ] + __bs.size ();
3244+ __to = std::addressof ( __bs[0 ]) + __s;
3245+ __to_end = std::addressof ( __bs[0 ]) + __bs.size ();
32463246 __frm = __frm_nxt;
32473247 }
32483248 } while (__r == codecvt_base::partial && __frm_nxt < __frm_end);
32493249 }
32503250 if (__r == codecvt_base::ok) {
32513251 size_t __s = __bs.size ();
32523252 __bs.resize (__bs.capacity ());
3253- char * __to = & __bs[0 ] + __s;
3253+ char * __to = std::addressof ( __bs[0 ]) + __s;
32543254 char * __to_end = __to + __bs.size ();
32553255 do {
32563256 char * __to_nxt;
32573257 __r = __cvtptr_->unshift (__st, __to, __to_end, __to_nxt);
32583258 if (__r == codecvt_base::noconv) {
3259- __bs.resize (__to - & __bs[0 ]);
3259+ __bs.resize (__to - std::addressof ( __bs[0 ]) );
32603260 __r = codecvt_base::ok;
32613261 } else if (__r == codecvt_base::ok) {
3262- __bs.resize (__to_nxt - & __bs[0 ]);
3262+ __bs.resize (__to_nxt - std::addressof ( __bs[0 ]) );
32633263 } else if (__r == codecvt_base::partial) {
3264- ptrdiff_t __sp = __to_nxt - & __bs[0 ];
3264+ ptrdiff_t __sp = __to_nxt - std::addressof ( __bs[0 ]) ;
32653265 __bs.resize (2 * __sp);
3266- __to = & __bs[0 ] + __sp;
3267- __to_end = & __bs[0 ] + __bs.size ();
3266+ __to = std::addressof ( __bs[0 ]) + __sp;
3267+ __to_end = std::addressof ( __bs[0 ]) + __bs.size ();
32683268 }
32693269 } while (__r == codecvt_base::partial);
32703270 if (__r == codecvt_base::ok)
@@ -3383,7 +3383,7 @@ typename wbuffer_convert<_Codecvt, _Elem, _Tr>::int_type wbuffer_convert<_Codecv
33833383 bool __initial = __read_mode ();
33843384 char_type __1buf;
33853385 if (this ->gptr () == 0 )
3386- this ->setg (& __1buf, & __1buf + 1 , & __1buf + 1 );
3386+ this ->setg (std::addressof ( __1buf), std::addressof ( __1buf) + 1 , std::addressof ( __1buf) + 1 );
33873387 const size_t __unget_sz = __initial ? 0 : std::min<size_t >((this ->egptr () - this ->eback ()) / 2 , 4 );
33883388 int_type __c = traits_type::eof ();
33893389 if (this ->gptr () == this ->egptr ()) {
@@ -3425,7 +3425,7 @@ typename wbuffer_convert<_Codecvt, _Elem, _Tr>::int_type wbuffer_convert<_Codecv
34253425 }
34263426 } else
34273427 __c = *this ->gptr ();
3428- if (this ->eback () == & __1buf)
3428+ if (this ->eback () == std::addressof ( __1buf) )
34293429 this ->setg (0 , 0 , 0 );
34303430 return __c;
34313431}
@@ -3461,7 +3461,7 @@ typename wbuffer_convert<_Codecvt, _Elem, _Tr>::int_type wbuffer_convert<_Codecv
34613461 char_type* __epb_save = this ->epptr ();
34623462 if (!traits_type::eq_int_type (__c, traits_type::eof ())) {
34633463 if (this ->pptr () == 0 )
3464- this ->setp (& __1buf, & __1buf + 1 );
3464+ this ->setp (std::addressof ( __1buf), std::addressof ( __1buf) + 1 );
34653465 *this ->pptr () = traits_type::to_char_type (__c);
34663466 this ->pbump (1 );
34673467 }
0 commit comments