public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely.gcc@gmail.com>
To: Patrick Palka <ppalka@redhat.com>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>,
	"libstdc++" <libstdc++@gcc.gnu.org>
Subject: Re: [PATCH 3/3] libstdc++: Fix return type of empty zip/adjacent_transform [PR106803]
Date: Fri, 9 Sep 2022 19:29:37 +0100	[thread overview]
Message-ID: <CAH6eHdQvt4VfHO86fNnY+wF3pCbNUKy66myjUS1rkR3K7WQq7A@mail.gmail.com> (raw)
In-Reply-To: <20220909172446.1546805-3-ppalka@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1659 bytes --]

On Fri, 9 Sep 2022, 18:27 Patrick Palka via Libstdc++, <
libstdc++@gcc.gnu.org> wrote:

> Tested on x86_64-pc-linux-gnu, does this series look OK for trunk?
>


All three are OK, thanks.


>         PR libstdc++/106803
>
> libstdc++-v3/ChangeLog:
>
>         * include/std/ranges (views::_ZipTransform::operator()): Fix
>         return type in the empty case.
>         (views::_AdjacentTransform::operator()): Likewise.
> ---
>  libstdc++-v3/include/std/ranges | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/libstdc++-v3/include/std/ranges
> b/libstdc++-v3/include/std/ranges
> index 37ad80ad3de..20eb4e82ac8 100644
> --- a/libstdc++-v3/include/std/ranges
> +++ b/libstdc++-v3/include/std/ranges
> @@ -5071,7 +5071,7 @@ namespace views::__adaptor
>         operator() [[nodiscard]] (_Fp&& __f, _Ts&&... __ts) const
>         {
>           if constexpr (sizeof...(_Ts) == 0)
> -           return views::empty<decay_t<invoke_result_t<_Fp>>>;
> +           return views::empty<decay_t<invoke_result_t<decay_t<_Fp>&>>>;
>           else
>             return zip_transform_view(std::forward<_Fp>(__f),
> std::forward<_Ts>(__ts)...);
>         }
> @@ -5762,7 +5762,7 @@ namespace views::__adaptor
>           operator() [[nodiscard]] (_Range&& __r, _Fp&& __f) const
>           {
>             if constexpr (_Nm == 0)
> -             return views::empty<tuple<>>;
> +             return zip_transform(std::forward<_Fp>(__f));
>             else
>               return adjacent_transform_view<all_t<_Range>, decay_t<_Fp>,
> _Nm>
>                 (std::forward<_Range>(__r), std::forward<_Fp>(__f));
> --
> 2.37.3.518.g79f2338b37
>
>

  reply	other threads:[~2022-09-09 18:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-09 17:24 [PATCH 1/3] libstdc++: Fix zip_view's operator- for integer-class difference type [PR106766] Patrick Palka
2022-09-09 17:24 ` [PATCH 2/3] libstdc++: Fix typo in adjacent_view::_Iterator [PR106798] Patrick Palka
2022-09-09 18:26   ` Jonathan Wakely
2022-09-09 17:24 ` [PATCH 3/3] libstdc++: Fix return type of empty zip/adjacent_transform [PR106803] Patrick Palka
2022-09-09 18:29   ` Jonathan Wakely [this message]
2022-09-09 18:26 ` [PATCH 1/3] libstdc++: Fix zip_view's operator- for integer-class difference type [PR106766] 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=CAH6eHdQvt4VfHO86fNnY+wF3pCbNUKy66myjUS1rkR3K7WQq7A@mail.gmail.com \
    --to=jwakely.gcc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=libstdc++@gcc.gnu.org \
    --cc=ppalka@redhat.com \
    /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).