[Patch] Implementation of n3793 <experimental/optional>
Luc Danton
lucdanton@free.fr
Fri Oct 18 06:06:00 GMT 2013
Hello everyone,
I have completed the copyright assignment process. I originally submitted a
candidate patch to implement <optional> at the end of July
(http://gcc.gnu.org/ml/libstdc++/2013-07/msg00137.html). This was
against n3672,
i.e. revision 4 of the optional proposal. As it so happens, n3793 was
published
Thursday as a 5th revision.
The big change between the two is that optional<T> now lives inside header
<experimental/optional> and namespace std::experimental. The patch I'm
submitting today implements that change, and most of the minor tweaks of
n3793,
but not the new equality and relational operators. I'll provide those in a
separate patch.
Important things that aren't quite correct and needs reviewing/fixing:
- include/Makefile.am, which I've modified due to putting the header in
include/experimental/optional -- tests do compile and pass but I'm
afraid
I've otherwise botched it
- include/Makefile.in needs to be regenerated
Not as important:
- changes to testsuite/libstdc++-dg/conformance.exp could use a
review, because
I've put the tests in testsuite/experimental/optional/
- the ABI-related matters of bad_optional_access and
__throw_bad_optional_access will need to be settled somehow (introduce
src/experimental/optional.cc and
src/experimental/compatibility_functexcept.cc? I can't really say),
and until
then I have left the associated function definitions inline in the
header --
they are marked by the only two XXX items of the file
There are still three tests that unexpectly fail, which prompted me to
file a bug
(http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58777).
Many thanks to all those that helped me.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: experimental-optional.patch
Type: text/x-patch
Size: 147229 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20131018/1bdb93c7/attachment.bin>
More information about the Libstdc++
mailing list