[binutils-gdb] gdb::optional: Add observers

sergiodj+buildbot@sergiodj.net sergiodj+buildbot@sergiodj.net
Tue Apr 4 20:33:00 GMT 2017


*** TEST RESULTS FOR COMMIT d194f1fe51cb85b8a919b7ee9e3a7715b0ec9744 ***

Author: Pedro Alves <palves@redhat.com>
Branch: master
Commit: d194f1fe51cb85b8a919b7ee9e3a7715b0ec9744

gdb::optional: Add observers

Currently, gdb::optional is really minimal and can only be used for
lazy initialization.  There's no way to get at the value contained
inside the optinal.  This commit corrects that, by adding observer
methods, mostly copied from libstdc++'s implementation of C++17
std::optional.

This will be used in the following patch.

gdb/ChangeLog:
2017-04-04  Pedro Alves  <palves@redhat.com>

	* common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
	operator bool, has_value and get methods.



More information about the Gdb-testers mailing list