[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gcc-bugs
Subject:    [Bug libstdc++/105118] New: Why is unexpected::value() named error() in libstdc++?
From:       hewillk at gmail dot com via Gcc-bugs <gcc-bugs () gcc ! gnu ! org>
Date:       2022-03-31 17:51:31
Message-ID: bug-105118-4 () http ! gcc ! gnu ! org/bugzilla/
[Download RAW message or body]

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?=
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic