1#ifndef SDL3PP_OBJ_PARAM_H_
2#define SDL3PP_OBJ_PARAM_H_
9template<
typename RAW_POINTER>
13 using RawPointer = RAW_POINTER;
17 : m_resource(resource)
28 constexpr explicit operator bool()
const {
return !!m_resource; }
34 constexpr operator RawPointer()
const {
return m_resource; }
40 RawPointer m_resource;
44template<
typename RAW_POINTER,
typename RAW_CONST_POINTER>
48 using RawPointer = RAW_POINTER;
49 using RawConstPointer = RAW_CONST_POINTER;
53 : m_resource(resource)
64 constexpr explicit operator bool()
const {
return !!m_resource; }
70 constexpr operator RawConstPointer()
const {
return m_resource; }
73 constexpr operator RawPointer()
const
75 return const_cast<RawPointer
>(m_resource);
82 RawConstPointer m_resource;
constexpr auto operator->() const
member access to underlying type.
Definition SDL3pp_objParam.h:79
constexpr ObjConstParam(RawConstPointer resource)
Constructs from const pointer.
Definition SDL3pp_objParam.h:52
constexpr auto operator<=>(const ObjConstParam &other) const =default
Comparison.
constexpr ObjConstParam(std::nullptr_t=nullptr)
Constructs null/invalid.
Definition SDL3pp_objParam.h:58
constexpr auto operator->() const
member access to underlying type.
Definition SDL3pp_objParam.h:37
constexpr ObjParam(RawPointer resource)
Constructs from RawPointer.
Definition SDL3pp_objParam.h:16
constexpr ObjParam(std::nullptr_t=nullptr)
Constructs null/invalid.
Definition SDL3pp_objParam.h:22
constexpr auto operator<=>(const ObjParam &other) const =default
Comparison.
Main include header for the SDL3pp library.