optional: minor improvements

This change makes minor improvements to the optional class used with
pre-C++17 compilers.

- adds operator== and operator!=
- adds various missing noexcept (but not constexpr) decorations
- defines operator bool in terms of has_value

Note that some constexpr decorations would require C++17 anyway.

	* include/abg-cxx-compat.h (optional): Add operator== and
	operator!=. Add noexcept decorations. Tweak operator bool.

Reviewed-by: Matthias Maennich <maennich@google.com>
Signed-off-by: Giuliano Procida <gprocida@google.com>
(cherry picked from commit ce7bd9f595960d05c4cf12bf2250907db792d00e)
Change-Id: I4ac3e0189d694585444aa45f8adb4741add14b31
1 file changed