5#ifndef INCLUDE_V8_MAYBE_H_
6#define INCLUDE_V8_MAYBE_H_
13namespace api_internal {
70 return has_value_ ? value_ : default_value;
83 Maybe() : has_value_(false) {}
84 explicit Maybe(
const T& t) : has_value_(true), value_(t) {}
123 Maybe() : is_valid_(false) {}
124 explicit Maybe(JustTag) : is_valid_(
true) {}
V8_INLINE bool IsNothing() const
V8_INLINE bool operator!=(const Maybe &other) const
V8_INLINE bool operator==(const Maybe &other) const
V8_INLINE bool IsJust() const
friend Maybe< U > Nothing()
V8_INLINE bool IsNothing() const
V8_INLINE bool operator!=(const Maybe &other) const
V8_WARN_UNUSED_RESULT V8_INLINE bool To(T *out) const
V8_INLINE void Check() const
friend Maybe< U > Just(const U &u)
V8_INLINE bool operator==(const Maybe &other) const
V8_INLINE T FromJust() const
V8_INLINE bool IsJust() const
V8_INLINE T ToChecked() const
V8_INLINE T FromMaybe(const T &default_value) const
V8_EXPORT void FromJustIsNothing()
Maybe< T > Just(const T &t)
#define V8_LIKELY(condition)
#define V8_WARN_UNUSED_RESULT
#define V8_UNLIKELY(condition)