Skip to content

Instantly share code, notes, and snippets.

Last active January 11, 2020 19:24
What would you like to do?
Brief absl::optional description
#if __cplusplus >= 201703 && __has_include(<optional>)
#include <optional>
namespace absl {
using std::bad_optional_access;
using std::optional;
using std::make_optional;
using std::nullopt_t;
using std::nullopt;
} // namespace absl
#else // __cplusplus >= 201703 && __has_include(<optional>)
// Internal abseil implementation.
// Under define not to generate more code to a compiler because std::optional
// and absl::optional claim to be compatible.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment