]> sourceware.org Git - libabigail.git/commit
optional: minor improvements
authorGiuliano Procida <gprocida@google.com>
Mon, 13 Jun 2022 14:25:31 +0000 (15:25 +0100)
committerDodji Seketeli <dodji@redhat.com>
Thu, 30 Jun 2022 16:30:58 +0000 (18:30 +0200)
commitce7bd9f595960d05c4cf12bf2250907db792d00e
treed1b31116dcb96d0036d6a9b2ef9c030e91b4a16c
parentd15c30e31950e27e72f50777dde00f63400ed80b
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>
include/abg-cxx-compat.h
This page took 0.031252 seconds and 5 git commands to generate.