diff --git a/tl/tl_basic_types.h b/tl/tl_basic_types.h index 93eceb7..5eadf62 100644 --- a/tl/tl_basic_types.h +++ b/tl/tl_basic_types.h @@ -671,6 +671,10 @@ class conditional { return _value ? _value->v : Inner(); } + constexpr bool has_value() const noexcept { + return (_value != nullptr); + } + private: const T *_value = nullptr;