1#ifndef SDL3PP_LOCK_BASE_H_
2#define SDL3PP_LOCK_BASE_H_
4#include <SDL3/SDL_assert.h>
5#include "SDL3pp_error.h"
17template<
class RESOURCE>
25 : m_resource(std::move(resource))
37 :
LockBase(std::move(other.m_resource))
49 std::swap(m_resource, other.m_resource);
54 RESOURCE
release() {
return m_resource.release(); }
Base class for locks.
Definition SDL3pp_lockBase.h:19
LockBase & operator=(LockBase &&other)
Move assignment.
Definition SDL3pp_lockBase.h:47
RESOURCE release()
Release locked resource without unlocking it.
Definition SDL3pp_lockBase.h:54
LockBase(LockBase &&other)
Move ctor.
Definition SDL3pp_lockBase.h:36
constexpr LockBase(RESOURCE &&resource)
Constructs initializing member.
Definition SDL3pp_lockBase.h:24
constexpr LockBase()=default
Default ctor.
constexpr ~LockBase()
Dtor.
Definition SDL3pp_lockBase.h:42
#define SDL_assert_paranoid(condition)
An assertion test that is performed only when built with paranoid settings.
Definition SDL3pp_assert.h:374
the main namespace where all SDL3pp public functions and types live
Definition SDL3pp_assert.h:7