// Copyright 2022 Simon Boyé #include #include #include namespace vk { Wrapper::Wrapper() noexcept { } Wrapper::Wrapper(Context& context, Flags flags) noexcept : m_context(&context) , m_flags(flags) { assert(m_context); } Wrapper::Wrapper(const Wrapper& other) noexcept : m_context(other.m_context) {} Wrapper::Wrapper(Wrapper&& other) noexcept { swap(other); } Wrapper::~Wrapper() noexcept { } Wrapper& Wrapper::operator=(const Wrapper& other) noexcept { if (&other != this) { m_context = other.m_context; m_flags = other.m_flags & ~OwnUnderlyingObject; } return *this; } Wrapper& Wrapper::operator=(Wrapper&& other) noexcept { swap(other); return *this; } }