From d0a3d430fb5e44642cbb8a2eac8fd4c7ada7b5f0 Mon Sep 17 00:00:00 2001 From: "A. Jiang" Date: Wed, 10 Jan 2024 20:53:35 +0800 Subject: [PATCH 1/5] [basic.string.general] Align both overloads of `data` --- source/strings.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/strings.tex b/source/strings.tex index cc13d13f95..6e8b0f6510 100644 --- a/source/strings.tex +++ b/source/strings.tex @@ -2238,7 +2238,7 @@ // \ref{string.ops}, string operations constexpr const charT* c_str() const noexcept; constexpr const charT* data() const noexcept; - constexpr charT* data() noexcept; + constexpr charT* data() noexcept; constexpr operator basic_string_view() const noexcept; constexpr allocator_type get_allocator() const noexcept; From 4abacae5eb5f8ecc01402a386cac67a122c381b2 Mon Sep 17 00:00:00 2001 From: "A. Jiang" Date: Sun, 20 Jul 2025 17:36:23 +0800 Subject: [PATCH 2/5] [basic.string.general] Use `(const_)reference` for consistency with other sequence containers --- source/strings.tex | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/strings.tex b/source/strings.tex index 6e8b0f6510..ba85561120 100644 --- a/source/strings.tex +++ b/source/strings.tex @@ -2131,10 +2131,10 @@ constexpr const_reference at(size_type n) const; constexpr reference at(size_type n); - constexpr const charT& front() const; - constexpr charT& front(); - constexpr const charT& back() const; - constexpr charT& back(); + constexpr const_reference front() const; + constexpr reference front(); + constexpr const_reference back() const; + constexpr reference back(); // \ref{string.modifiers}, modifiers constexpr basic_string& operator+=(const basic_string& str); From eb94afbaf08f9dff1f39854f427921dd1f32b9cc Mon Sep 17 00:00:00 2001 From: "A. Jiang" Date: Sun, 20 Jul 2025 17:37:57 +0800 Subject: [PATCH 3/5] [string.access] Use `(const_)reference` for consistency with other sequence containers --- source/strings.tex | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/strings.tex b/source/strings.tex index ba85561120..adfd4575dd 100644 --- a/source/strings.tex +++ b/source/strings.tex @@ -3135,8 +3135,8 @@ \indexlibrarymember{front}{basic_string}% \begin{itemdecl} -constexpr const charT& front() const; -constexpr charT& front(); +constexpr const_reference front() const; +constexpr reference front(); \end{itemdecl} \begin{itemdescr} @@ -3151,8 +3151,8 @@ \indexlibrarymember{back}{basic_string}% \begin{itemdecl} -constexpr const charT& back() const; -constexpr charT& back(); +constexpr const_reference back() const; +constexpr reference back(); \end{itemdecl} \begin{itemdescr} From 4f32f71ed9aed1ef087c45d8a06f4c1566a4bf67 Mon Sep 17 00:00:00 2001 From: "A. Jiang" Date: Sun, 20 Jul 2025 17:39:32 +0800 Subject: [PATCH 4/5] [string.view.template.general] Use `const charT*` for `data` and a data member, for the consistency with `basic_string`. --- source/strings.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/strings.tex b/source/strings.tex index adfd4575dd..cb949efeee 100644 --- a/source/strings.tex +++ b/source/strings.tex @@ -665,7 +665,7 @@ constexpr const_reference at(size_type pos) const; // freestanding-deleted constexpr const_reference front() const; constexpr const_reference back() const; - constexpr const_pointer data() const noexcept; + constexpr const charT* data() const noexcept; // \ref{string.view.modifiers}, modifiers constexpr void remove_prefix(size_type n); @@ -734,7 +734,7 @@ constexpr size_type find_last_not_of(const charT* s, size_type pos = npos) const; private: - const_pointer @\exposid{data_}@; // \expos + const charT* @\exposid{data_}@; // \expos size_type @\exposid{size_}@; // \expos }; From d915a0a59a1958f4eabd2a791a8daff17106998f Mon Sep 17 00:00:00 2001 From: "A. Jiang" Date: Sun, 20 Jul 2025 17:40:02 +0800 Subject: [PATCH 5/5] [string.view.access] Use `const charT*` for `data` for consistency with `basic_string` --- source/strings.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/strings.tex b/source/strings.tex index cb949efeee..756b69690c 100644 --- a/source/strings.tex +++ b/source/strings.tex @@ -1110,7 +1110,7 @@ \indexlibrarymember{data}{basic_string_view}% \begin{itemdecl} -constexpr const_pointer data() const noexcept; +constexpr const charT* data() const noexcept; \end{itemdecl} \begin{itemdescr} pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy