@@ -3114,7 +3114,7 @@ public:
31143114 }
31153115 _LIBCPP_HIDE_FROM_ABI wide_string from_bytes (const char * __first, const char * __last);
31163116
3117- _LIBCPP_HIDE_FROM_ABI byte_string to_bytes (_Elem __wchar) { return to_bytes (& __wchar, & __wchar + 1 ); }
3117+ _LIBCPP_HIDE_FROM_ABI byte_string to_bytes (_Elem __wchar) { return to_bytes (std::addressof ( __wchar), std::addressof ( __wchar) + 1 ); }
31183118 _LIBCPP_HIDE_FROM_ABI byte_string to_bytes (const _Elem* __wptr) {
31193119 return to_bytes (__wptr, __wptr + char_traits<_Elem>::length (__wptr));
31203120 }
@@ -3176,7 +3176,7 @@ wstring_convert<_Codecvt, _Elem, _WideAlloc, _ByteAlloc>::from_bytes(const char*
31763176 codecvt_base::result __r = codecvt_base::ok;
31773177 state_type __st = __cvtstate_;
31783178 if (__frm != __frm_end) {
3179- _Elem* __to = & __ws[0 ];
3179+ _Elem* __to = std::addressof ( __ws[0 ]) ;
31803180 _Elem* __to_end = __to + __ws.size ();
31813181 const char * __frm_nxt;
31823182 do {
@@ -3186,19 +3186,19 @@ wstring_convert<_Codecvt, _Elem, _WideAlloc, _ByteAlloc>::from_bytes(const char*
31863186 if (__frm_nxt == __frm) {
31873187 __r = codecvt_base::error;
31883188 } else if (__r == codecvt_base::noconv) {
3189- __ws.resize (__to - & __ws[0 ]);
3189+ __ws.resize (__to - std::addressof ( __ws[0 ]) );
31903190 // This only gets executed if _Elem is char
31913191 __ws.append ((const _Elem*)__frm, (const _Elem*)__frm_end);
31923192 __frm = __frm_nxt;
31933193 __r = codecvt_base::ok;
31943194 } else if (__r == codecvt_base::ok) {
3195- __ws.resize (__to_nxt - & __ws[0 ]);
3195+ __ws.resize (__to_nxt - std::addressof ( __ws[0 ]) );
31963196 __frm = __frm_nxt;
31973197 } else if (__r == codecvt_base::partial) {
3198- ptrdiff_t __s = __to_nxt - & __ws[0 ];
3198+ ptrdiff_t __s = __to_nxt - std::addressof ( __ws[0 ]) ;
31993199 __ws.resize (2 * __s);
3200- __to = & __ws[0 ] + __s;
3201- __to_end = & __ws[0 ] + __ws.size ();
3200+ __to = std::addressof ( __ws[0 ]) + __s;
3201+ __to_end = std::addressof ( __ws[0 ]) + __ws.size ();
32023202 __frm = __frm_nxt;
32033203 }
32043204 } while (__r == codecvt_base::partial && __frm_nxt < __frm_end);
@@ -3224,7 +3224,7 @@ wstring_convert<_Codecvt, _Elem, _WideAlloc, _ByteAlloc>::to_bytes(const _Elem*
32243224 codecvt_base::result __r = codecvt_base::ok;
32253225 state_type __st = __cvtstate_;
32263226 if (__frm != __frm_end) {
3227- char * __to = & __bs[0 ];
3227+ char * __to = std::addressof ( __bs[0 ]) ;
32283228 char * __to_end = __to + __bs.size ();
32293229 const _Elem* __frm_nxt;
32303230 do {
@@ -3234,41 +3234,41 @@ wstring_convert<_Codecvt, _Elem, _WideAlloc, _ByteAlloc>::to_bytes(const _Elem*
32343234 if (__frm_nxt == __frm) {
32353235 __r = codecvt_base::error;
32363236 } else if (__r == codecvt_base::noconv) {
3237- __bs.resize (__to - & __bs[0 ]);
3237+ __bs.resize (__to - std::addressof ( __bs[0 ]) );
32383238 // This only gets executed if _Elem is char
32393239 __bs.append ((const char *)__frm, (const char *)__frm_end);
32403240 __frm = __frm_nxt;
32413241 __r = codecvt_base::ok;
32423242 } else if (__r == codecvt_base::ok) {
3243- __bs.resize (__to_nxt - & __bs[0 ]);
3243+ __bs.resize (__to_nxt - std::addressof ( __bs[0 ]) );
32443244 __frm = __frm_nxt;
32453245 } else if (__r == codecvt_base::partial) {
3246- ptrdiff_t __s = __to_nxt - & __bs[0 ];
3246+ ptrdiff_t __s = __to_nxt - std::addressof ( __bs[0 ]) ;
32473247 __bs.resize (2 * __s);
3248- __to = & __bs[0 ] + __s;
3249- __to_end = & __bs[0 ] + __bs.size ();
3248+ __to = std::addressof ( __bs[0 ]) + __s;
3249+ __to_end = std::addressof ( __bs[0 ]) + __bs.size ();
32503250 __frm = __frm_nxt;
32513251 }
32523252 } while (__r == codecvt_base::partial && __frm_nxt < __frm_end);
32533253 }
32543254 if (__r == codecvt_base::ok) {
32553255 size_t __s = __bs.size ();
32563256 __bs.resize (__bs.capacity ());
3257- char * __to = & __bs[0 ] + __s;
3257+ char * __to = std::addressof ( __bs[0 ]) + __s;
32583258 char * __to_end = __to + __bs.size ();
32593259 do {
32603260 char * __to_nxt;
32613261 __r = __cvtptr_->unshift (__st, __to, __to_end, __to_nxt);
32623262 if (__r == codecvt_base::noconv) {
3263- __bs.resize (__to - & __bs[0 ]);
3263+ __bs.resize (__to - std::addressof ( __bs[0 ]) );
32643264 __r = codecvt_base::ok;
32653265 } else if (__r == codecvt_base::ok) {
3266- __bs.resize (__to_nxt - & __bs[0 ]);
3266+ __bs.resize (__to_nxt - std::addressof ( __bs[0 ]) );
32673267 } else if (__r == codecvt_base::partial) {
3268- ptrdiff_t __sp = __to_nxt - & __bs[0 ];
3268+ ptrdiff_t __sp = __to_nxt - std::addressof ( __bs[0 ]) ;
32693269 __bs.resize (2 * __sp);
3270- __to = & __bs[0 ] + __sp;
3271- __to_end = & __bs[0 ] + __bs.size ();
3270+ __to = std::addressof ( __bs[0 ]) + __sp;
3271+ __to_end = std::addressof ( __bs[0 ]) + __bs.size ();
32723272 }
32733273 } while (__r == codecvt_base::partial);
32743274 if (__r == codecvt_base::ok)
@@ -3387,7 +3387,7 @@ typename wbuffer_convert<_Codecvt, _Elem, _Tr>::int_type wbuffer_convert<_Codecv
33873387 bool __initial = __read_mode ();
33883388 char_type __1buf;
33893389 if (this ->gptr () == 0 )
3390- this ->setg (& __1buf, & __1buf + 1 , & __1buf + 1 );
3390+ this ->setg (std::addressof ( __1buf), std::addressof ( __1buf) + 1 , std::addressof ( __1buf) + 1 );
33913391 const size_t __unget_sz = __initial ? 0 : std::min<size_t >((this ->egptr () - this ->eback ()) / 2 , 4 );
33923392 int_type __c = traits_type::eof ();
33933393 if (this ->gptr () == this ->egptr ()) {
@@ -3429,7 +3429,7 @@ typename wbuffer_convert<_Codecvt, _Elem, _Tr>::int_type wbuffer_convert<_Codecv
34293429 }
34303430 } else
34313431 __c = *this ->gptr ();
3432- if (this ->eback () == & __1buf)
3432+ if (this ->eback () == std::addressof ( __1buf) )
34333433 this ->setg (0 , 0 , 0 );
34343434 return __c;
34353435}
@@ -3465,7 +3465,7 @@ typename wbuffer_convert<_Codecvt, _Elem, _Tr>::int_type wbuffer_convert<_Codecv
34653465 char_type* __epb_save = this ->epptr ();
34663466 if (!traits_type::eq_int_type (__c, traits_type::eof ())) {
34673467 if (this ->pptr () == 0 )
3468- this ->setp (& __1buf, & __1buf + 1 );
3468+ this ->setp (std::addressof ( __1buf), std::addressof ( __1buf) + 1 );
34693469 *this ->pptr () = traits_type::to_char_type (__c);
34703470 this ->pbump (1 );
34713471 }
0 commit comments