diff --git a/libcxx/include/string b/libcxx/include/string index b7f2d12269463..40996e4e44948 100644 --- a/libcxx/include/string +++ b/libcxx/include/string @@ -767,18 +767,18 @@ private: using __default_allocator_type _LIBCPP_NODEBUG = allocator<_CharT>; public: - typedef basic_string __self; - typedef basic_string_view<_CharT, _Traits> __self_view; - typedef _Traits traits_type; - typedef _CharT value_type; - typedef _Allocator allocator_type; - typedef allocator_traits __alloc_traits; - typedef typename __alloc_traits::size_type size_type; - typedef typename __alloc_traits::difference_type difference_type; - typedef value_type& reference; - typedef const value_type& const_reference; - typedef typename __alloc_traits::pointer pointer; - typedef typename __alloc_traits::const_pointer const_pointer; + using __self _LIBCPP_NODEBUG = basic_string; + using __self_view _LIBCPP_NODEBUG = basic_string_view<_CharT, _Traits>; + using traits_type = _Traits; + using value_type = _CharT; + using allocator_type = _Allocator; + using __alloc_traits _LIBCPP_NODEBUG = allocator_traits; + using size_type = typename __alloc_traits::size_type; + using difference_type = typename __alloc_traits::difference_type; + using reference = value_type&; + using const_reference = const value_type&; + using pointer = typename __alloc_traits::pointer; + using const_pointer = typename __alloc_traits::const_pointer; // A basic_string contains the following members which may be trivially relocatable: // - pointer: is currently assumed to be trivially relocatable, but is still checked in case that changes @@ -841,14 +841,14 @@ public: // Users might provide custom allocators, and prior to C++20 we have no existing way to detect whether the allocator's // pointer type is contiguous (though it has to be by the Standard). Using the wrapper type ensures the iterator is // considered contiguous. - typedef __bounded_iter<__wrap_iter > iterator; - typedef __bounded_iter<__wrap_iter > const_iterator; + using iterator = __bounded_iter<__wrap_iter >; + using const_iterator = __bounded_iter<__wrap_iter >; # else - typedef __wrap_iter iterator; - typedef __wrap_iter const_iterator; + using iterator = __wrap_iter; + using const_iterator = __wrap_iter; # endif - typedef std::reverse_iterator reverse_iterator; - typedef std::reverse_iterator const_reverse_iterator; + using reverse_iterator = std::reverse_iterator; + using const_reverse_iterator = std::reverse_iterator; private: static_assert(CHAR_BIT == 8, "This implementation assumes that one byte contains 8 bits");