MeshLib
 
Loading...
Searching...
No Matches
MRUniquePtr.h
Go to the documentation of this file.
1#pragma once
2
3#include <memory>
4
5namespace MR
6{
7
10template<typename T>
11struct UniquePtr : std::unique_ptr<T>
12{
13 UniquePtr() noexcept = default;
14 UniquePtr( const UniquePtr& ) noexcept : std::unique_ptr<T>() {}
15 UniquePtr( UniquePtr&& ) noexcept = default;
16 UniquePtr& operator =( const UniquePtr& ) noexcept { return *this; }
17 UniquePtr& operator =( UniquePtr&& ) noexcept = default;
18 UniquePtr& operator =( std::unique_ptr<T>&& b ) noexcept { *static_cast<std::unique_ptr<T>*>(this) = std::move( b ); return *this; }
19};
20
21} //namespace MR
Definition MRCameraOrientationPlugin.h:7
Definition MRUniquePtr.h:12
UniquePtr(UniquePtr &&) noexcept=default
UniquePtr & operator=(const UniquePtr &) noexcept
Definition MRUniquePtr.h:16
UniquePtr() noexcept=default