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?