diff options
author | Jacques Lucke <jacques@blender.org> | 2020-06-09 11:10:56 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2020-06-09 11:15:43 +0300 |
commit | d8678e02ecec9375bec1dcf1388c6fc8b4ce3ad2 (patch) | |
tree | 6e7d2a7452091877f73d413d830e6cb12e86745f /source/blender/blenlib/BLI_utility_mixins.hh | |
parent | 50258d55e7c1360274d40e303386cf70b16c8b2f (diff) |
BLI: generally improve C++ data structures
The main focus here was to improve the docs significantly. Furthermore,
I reimplemented `Set`, `Map` and `VectorSet`. They are now (usually)
faster, simpler and more customizable. I also rewrote `Stack` to make
it more efficient by avoiding unnecessary copies.
Thanks to everyone who helped with constructive feedback.
Approved by brecht and sybren.
Differential Revision: https://developer.blender.org/D7931
Diffstat (limited to 'source/blender/blenlib/BLI_utility_mixins.hh')
-rw-r--r-- | source/blender/blenlib/BLI_utility_mixins.hh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_utility_mixins.hh b/source/blender/blenlib/BLI_utility_mixins.hh index 441575f9111..31d28792865 100644 --- a/source/blender/blenlib/BLI_utility_mixins.hh +++ b/source/blender/blenlib/BLI_utility_mixins.hh @@ -23,6 +23,9 @@ namespace BLI { +/** + * A type that inherits from NonCopyable cannot be copied anymore. + */ class NonCopyable { public: /* Disable copy construction and assignment. */ @@ -35,6 +38,9 @@ class NonCopyable { NonCopyable &operator=(NonCopyable &&other) = default; }; +/** + * A type that inherits from NonMovable cannot be moved anymore. + */ class NonMovable { public: /* Disable move construction and assignment. */ |