From: "Arsen Arsenović" <arsen@aarsen.me>
To: gcc-patches@gcc.gnu.org
Cc: libstdc++@gcc.gnu.org, "Arsen Arsenović" <arsen@aarsen.me>
Subject: [PATCH 1/2] libstdc++: fix _V badname in <generator>
Date: Sat, 23 Mar 2024 16:15:42 +0100 [thread overview]
Message-ID: <20240323154205.1907790-2-arsen@aarsen.me> (raw)
In-Reply-To: <20240323154205.1907790-1-arsen@aarsen.me>
libstdc++-v3/ChangeLog:
* include/std/generator: Fix _V badname.
---
libstdc++-v3/include/std/generator | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/libstdc++-v3/include/std/generator b/libstdc++-v3/include/std/generator
index 87983ee5e7c6..2d1dcced1e57 100644
--- a/libstdc++-v3/include/std/generator
+++ b/libstdc++-v3/include/std/generator
@@ -76,14 +76,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* @headerfile generator
* @since C++23
*/
- template<typename _Ref, typename _V = void, typename _Alloc = void>
+ template<typename _Ref, typename _Val = void, typename _Alloc = void>
class generator;
/// @cond undocumented
namespace __gen
{
/// _Reference type for a generator whose reference (first argument) and
- /// value (second argument) types are _Ref and _V.
+ /// value (second argument) types are _Ref and _Val.
template<typename _Ref, typename _Val>
using _Reference_t = __conditional_t<is_void_v<_Val>,
_Ref&&, _Ref>;
@@ -642,14 +642,16 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
} // namespace __gen
/// @endcond
- template<typename _Ref, typename _V, typename _Alloc>
+ template<typename _Ref, typename _Val, typename _Alloc>
class generator
- : public ranges::view_interface<generator<_Ref, _V, _Alloc>>
+ : public ranges::view_interface<generator<_Ref, _Val, _Alloc>>
{
- using _Value = __conditional_t<is_void_v<_V>, remove_cvref_t<_Ref>, _V>;
+ using _Value = __conditional_t<is_void_v<_Val>,
+ remove_cvref_t<_Ref>,
+ _Val>;
static_assert(__gen::_Cv_unqualified_object<_Value>,
"Generator value must be a cv-unqualified object type");
- using _Reference = __gen::_Reference_t<_Ref, _V>;
+ using _Reference = __gen::_Reference_t<_Ref, _Val>;
static_assert(is_reference_v<_Reference>
|| (__gen::_Cv_unqualified_object<_Reference>
&& copy_constructible<_Reference>),
@@ -737,8 +739,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
bool _M_began = false;
};
- template<class _Ref, class _V, class _Alloc>
- struct generator<_Ref, _V, _Alloc>::_Iterator
+ template<class _Ref, class _Val, class _Alloc>
+ struct generator<_Ref, _Val, _Alloc>::_Iterator
{
using value_type = _Value;
using difference_type = ptrdiff_t;
--
2.44.0
next prev parent reply other threads:[~2024-03-23 15:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-23 15:15 [PATCH 0/2] A few minor fixes " Arsen Arsenović
2024-03-23 15:15 ` Arsen Arsenović [this message]
2024-03-26 11:00 ` [PATCH 1/2] libstdc++: fix _V badname " Jonathan Wakely
2024-03-23 15:15 ` [PATCH 2/2] libstdc++: fix generator iterator operator* return type Arsen Arsenović
2024-03-26 10:59 ` Jonathan Wakely
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240323154205.1907790-2-arsen@aarsen.me \
--to=arsen@aarsen.me \
--cc=gcc-patches@gcc.gnu.org \
--cc=libstdc++@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).