diff options
Diffstat (limited to 'source/blender/blenlib/BLI_memory_utils.hh')
-rw-r--r-- | source/blender/blenlib/BLI_memory_utils.hh | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/source/blender/blenlib/BLI_memory_utils.hh b/source/blender/blenlib/BLI_memory_utils.hh index 81792e2101c..0c2cae6c606 100644 --- a/source/blender/blenlib/BLI_memory_utils.hh +++ b/source/blender/blenlib/BLI_memory_utils.hh @@ -204,14 +204,6 @@ template<typename T> void uninitialized_fill_n(T *dst, uint n, const T &value) } } -/** - * The same as std::unique_ptr. This can be removed when we start using C++14. - */ -template<typename T, typename... Args> std::unique_ptr<T> make_unique(Args &&... args) -{ - return std::unique_ptr<T>(new T(std::forward<Args>(args)...)); -} - template<typename T> struct DestructValueAtAddress { void operator()(T *ptr) { @@ -250,6 +242,13 @@ template<size_t Size, size_t Alignment> class alignas(Alignment) AlignedBuffer { } }; +/** + * This can be used by container constructors. A parameter of this type should be used to indicate + * that the constructor does not construct the elements. + */ +class NoInitialization { +}; + } // namespace blender #endif /* __BLI_MEMORY_UTILS_HH__ */ |