diff options
author | Jacques Lucke <jacques@blender.org> | 2020-06-30 16:58:14 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2020-06-30 16:58:29 +0300 |
commit | 37820651bb4f22e316f00a02e4bf5da2589a03c9 (patch) | |
tree | d5a720582e58c151c61a09304f5b354516283899 /source/blender/blenlib/BLI_memory_utils.hh | |
parent | 5b03f49302a39577f2373906cfba19feebfaa9ba (diff) |
BLI: add Array constructor that does not initialize non-trivial types
This should rarely be necessary, but I have a use case coming up soon.
Diffstat (limited to 'source/blender/blenlib/BLI_memory_utils.hh')
-rw-r--r-- | source/blender/blenlib/BLI_memory_utils.hh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_memory_utils.hh b/source/blender/blenlib/BLI_memory_utils.hh index baad862bce5..0c2cae6c606 100644 --- a/source/blender/blenlib/BLI_memory_utils.hh +++ b/source/blender/blenlib/BLI_memory_utils.hh @@ -242,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__ */ |