@@ -3114,7 +3114,7 @@ public:
3114
3114
}
3115
3115
_LIBCPP_HIDE_FROM_ABI wide_string from_bytes (const char * __first, const char * __last);
3116
3116
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 ); }
3118
3118
_LIBCPP_HIDE_FROM_ABI byte_string to_bytes (const _Elem* __wptr) {
3119
3119
return to_bytes (__wptr, __wptr + char_traits<_Elem>::length (__wptr));
3120
3120
}
@@ -3176,7 +3176,7 @@ wstring_convert<_Codecvt, _Elem, _WideAlloc, _ByteAlloc>::from_bytes(const char*
3176
3176
codecvt_base::result __r = codecvt_base::ok;
3177
3177
state_type __st = __cvtstate_;
3178
3178
if (__frm != __frm_end) {
3179
- _Elem* __to = & __ws[0 ];
3179
+ _Elem* __to = std::addressof ( __ws[0 ]) ;
3180
3180
_Elem* __to_end = __to + __ws.size ();
3181
3181
const char * __frm_nxt;
3182
3182
do {
@@ -3186,19 +3186,19 @@ wstring_convert<_Codecvt, _Elem, _WideAlloc, _ByteAlloc>::from_bytes(const char*
3186
3186
if (__frm_nxt == __frm) {
3187
3187
__r = codecvt_base::error;
3188
3188
} else if (__r == codecvt_base::noconv) {
3189
- __ws.resize (__to - & __ws[0 ]);
3189
+ __ws.resize (__to - std::addressof ( __ws[0 ]) );
3190
3190
// This only gets executed if _Elem is char
3191
3191
__ws.append ((const _Elem*)__frm, (const _Elem*)__frm_end);
3192
3192
__frm = __frm_nxt;
3193
3193
__r = codecvt_base::ok;
3194
3194
} else if (__r == codecvt_base::ok) {
3195
- __ws.resize (__to_nxt - & __ws[0 ]);
3195
+ __ws.resize (__to_nxt - std::addressof ( __ws[0 ]) );
3196
3196
__frm = __frm_nxt;
3197
3197
} else if (__r == codecvt_base::partial) {
3198
- ptrdiff_t __s = __to_nxt - & __ws[0 ];
3198
+ ptrdiff_t __s = __to_nxt - std::addressof ( __ws[0 ]) ;
3199
3199
__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 ();
3202
3202
__frm = __frm_nxt;
3203
3203
}
3204
3204
} while (__r == codecvt_base::partial && __frm_nxt < __frm_end);
@@ -3224,7 +3224,7 @@ wstring_convert<_Codecvt, _Elem, _WideAlloc, _ByteAlloc>::to_bytes(const _Elem*
3224
3224
codecvt_base::result __r = codecvt_base::ok;
3225
3225
state_type __st = __cvtstate_;
3226
3226
if (__frm != __frm_end) {
3227
- char * __to = & __bs[0 ];
3227
+ char * __to = std::addressof ( __bs[0 ]) ;
3228
3228
char * __to_end = __to + __bs.size ();
3229
3229
const _Elem* __frm_nxt;
3230
3230
do {
@@ -3234,41 +3234,41 @@ wstring_convert<_Codecvt, _Elem, _WideAlloc, _ByteAlloc>::to_bytes(const _Elem*
3234
3234
if (__frm_nxt == __frm) {
3235
3235
__r = codecvt_base::error;
3236
3236
} else if (__r == codecvt_base::noconv) {
3237
- __bs.resize (__to - & __bs[0 ]);
3237
+ __bs.resize (__to - std::addressof ( __bs[0 ]) );
3238
3238
// This only gets executed if _Elem is char
3239
3239
__bs.append ((const char *)__frm, (const char *)__frm_end);
3240
3240
__frm = __frm_nxt;
3241
3241
__r = codecvt_base::ok;
3242
3242
} else if (__r == codecvt_base::ok) {
3243
- __bs.resize (__to_nxt - & __bs[0 ]);
3243
+ __bs.resize (__to_nxt - std::addressof ( __bs[0 ]) );
3244
3244
__frm = __frm_nxt;
3245
3245
} else if (__r == codecvt_base::partial) {
3246
- ptrdiff_t __s = __to_nxt - & __bs[0 ];
3246
+ ptrdiff_t __s = __to_nxt - std::addressof ( __bs[0 ]) ;
3247
3247
__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 ();
3250
3250
__frm = __frm_nxt;
3251
3251
}
3252
3252
} while (__r == codecvt_base::partial && __frm_nxt < __frm_end);
3253
3253
}
3254
3254
if (__r == codecvt_base::ok) {
3255
3255
size_t __s = __bs.size ();
3256
3256
__bs.resize (__bs.capacity ());
3257
- char * __to = & __bs[0 ] + __s;
3257
+ char * __to = std::addressof ( __bs[0 ]) + __s;
3258
3258
char * __to_end = __to + __bs.size ();
3259
3259
do {
3260
3260
char * __to_nxt;
3261
3261
__r = __cvtptr_->unshift (__st, __to, __to_end, __to_nxt);
3262
3262
if (__r == codecvt_base::noconv) {
3263
- __bs.resize (__to - & __bs[0 ]);
3263
+ __bs.resize (__to - std::addressof ( __bs[0 ]) );
3264
3264
__r = codecvt_base::ok;
3265
3265
} else if (__r == codecvt_base::ok) {
3266
- __bs.resize (__to_nxt - & __bs[0 ]);
3266
+ __bs.resize (__to_nxt - std::addressof ( __bs[0 ]) );
3267
3267
} else if (__r == codecvt_base::partial) {
3268
- ptrdiff_t __sp = __to_nxt - & __bs[0 ];
3268
+ ptrdiff_t __sp = __to_nxt - std::addressof ( __bs[0 ]) ;
3269
3269
__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 ();
3272
3272
}
3273
3273
} while (__r == codecvt_base::partial);
3274
3274
if (__r == codecvt_base::ok)
@@ -3387,7 +3387,7 @@ typename wbuffer_convert<_Codecvt, _Elem, _Tr>::int_type wbuffer_convert<_Codecv
3387
3387
bool __initial = __read_mode ();
3388
3388
char_type __1buf;
3389
3389
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 );
3391
3391
const size_t __unget_sz = __initial ? 0 : std::min<size_t >((this ->egptr () - this ->eback ()) / 2 , 4 );
3392
3392
int_type __c = traits_type::eof ();
3393
3393
if (this ->gptr () == this ->egptr ()) {
@@ -3429,7 +3429,7 @@ typename wbuffer_convert<_Codecvt, _Elem, _Tr>::int_type wbuffer_convert<_Codecv
3429
3429
}
3430
3430
} else
3431
3431
__c = *this ->gptr ();
3432
- if (this ->eback () == & __1buf)
3432
+ if (this ->eback () == std::addressof ( __1buf) )
3433
3433
this ->setg (0 , 0 , 0 );
3434
3434
return __c;
3435
3435
}
@@ -3465,7 +3465,7 @@ typename wbuffer_convert<_Codecvt, _Elem, _Tr>::int_type wbuffer_convert<_Codecv
3465
3465
char_type* __epb_save = this ->epptr ();
3466
3466
if (!traits_type::eq_int_type (__c, traits_type::eof ())) {
3467
3467
if (this ->pptr () == 0 )
3468
- this ->setp (& __1buf, & __1buf + 1 );
3468
+ this ->setp (std::addressof ( __1buf), std::addressof ( __1buf) + 1 );
3469
3469
*this ->pptr () = traits_type::to_char_type (__c);
3470
3470
this ->pbump (1 );
3471
3471
}
0 commit comments