public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/100290] New: join_view::_Iterator::operator++ copies _M_parent->_M_inner when _S_ref_is_glvalue is false
@ 2021-04-27 12:49 rs2740 at gmail dot com
  2021-04-27 13:20 ` [Bug libstdc++/100290] " hpwxf at haveneer dot com
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: rs2740 at gmail dot com @ 2021-04-27 12:49 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100290

            Bug ID: 100290
           Summary: join_view::_Iterator::operator++ copies
                    _M_parent->_M_inner when _S_ref_is_glvalue is false
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rs2740 at gmail dot com
  Target Milestone: ---

auto&& __inner_range = [this] () -> decltype(auto) {
              if constexpr (_S_ref_is_glvalue)
                return *_M_outer;
              else
                return _M_parent->_M_inner;
            }();

This is a copy in the else case due to decltype(auto) producing the declared
type of _M_inner. The lambda should return auto&&.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-05-03 20:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-27 12:49 [Bug libstdc++/100290] New: join_view::_Iterator::operator++ copies _M_parent->_M_inner when _S_ref_is_glvalue is false rs2740 at gmail dot com
2021-04-27 13:20 ` [Bug libstdc++/100290] " hpwxf at haveneer dot com
2021-04-27 13:37 ` ppalka at gcc dot gnu.org
2021-04-27 18:08 ` cvs-commit at gcc dot gnu.org
2021-04-27 21:24 ` cvs-commit at gcc dot gnu.org
2021-05-03 20:10 ` cvs-commit at gcc dot gnu.org
2021-05-03 20:10 ` ppalka at gcc dot gnu.org

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).