public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/105118] New: Why is unexpected::value() named error() in libstdc++?
@ 2022-03-31 17:51 hewillk at gmail dot com
  2022-04-01  7:33 ` [Bug libstdc++/105118] " de34 at live dot cn
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: hewillk at gmail dot com @ 2022-03-31 17:51 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 105118
           Summary: Why is unexpected::value() named error() in libstdc++?
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hewillk at gmail dot com
  Target Milestone: ---

In libstdc++'s implementation of std::expected, std::unexpected gets the _M_val
through error(), but in [expected.un.object.general], unexpected uses value()
to access val.
In my opinion, error() should be a better member function name, but the
standard currently uses value(). So I wonder why libstdc++ uses error()? Is
there any information about this?

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

end of thread, other threads:[~2023-12-01  5:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-31 17:51 [Bug libstdc++/105118] New: Why is unexpected::value() named error() in libstdc++? hewillk at gmail dot com
2022-04-01  7:33 ` [Bug libstdc++/105118] " de34 at live dot cn
2022-04-01 11:37 ` redi at gcc dot gnu.org
2023-12-01  5:07 ` hewillk at gmail dot com

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