13 #ifndef OGLPLUS_OBJECT_OPTIONAL_1107121519_HPP
14 #define OGLPLUS_OBJECT_OPTIONAL_1107121519_HPP
16 #include <oglplus/detail/optional.hpp>
32 template <
class Object>
33 class OptionalImpl<tag::Object, Object>
47 OGLPLUS_NOEXCEPT(true)
48 : Object(typename Object::Uninitialized_())
60 OGLPLUS_NOEXCEPT(true)
61 : Object(std::move(temp))
66 OGLPLUS_NOEXCEPT(true)
67 : Object(static_cast<Object&&>(temp))
70 OptionalImpl& operator = (Object&& temp)
72 Object::operator=(std::move(temp));
87 OGLPLUS_NOEXCEPT(true)
89 return this->_name != 0u;
92 OGLPLUS_EXPLICIT
operator bool (
void)
const
94 return IsInitialized();
99 OGLPLUS_NOEXCEPT(true)
101 return Object(static_cast<Object&&>(*
this));
107 #endif // include guard
Object Release(void)
Releases the stored object and makes this Optional uninitialized.
Definition: optional.hpp:98
OptionalImpl(Object &&temp)
Construction of an initialized instance.
Definition: optional.hpp:59
bool IsInitialized(void) const
Returns true if the object is initialized, false otherwise.
Definition: optional.hpp:86
OptionalImpl(void)
Construction of an uninitialized instance.
Definition: optional.hpp:46
Template for object wrappers.
OptionalImpl(OptionalImpl &&temp)
Move constructor.
Definition: optional.hpp:65