[Bf-blender-cvs] [6068f49c330] master: BLI: remove static assert noexcept move constructors
Jacques Lucke
noreply at git.blender.org
Tue Jul 14 15:23:51 CEST 2020
Commit: 6068f49c3309271a31ef131c0c9a5389310e8593
Author: Jacques Lucke
Date: Tue Jul 14 15:20:44 2020 +0200
Branches: master
https://developer.blender.org/rB6068f49c3309271a31ef131c0c9a5389310e8593
BLI: remove static assert noexcept move constructors
The move constructor of `mpq_class` from GMP currently
allocates when it is moved. So, it cannot be noexcept.
Since we want to use this type, this static assert cannot
stay there.
===================================================================
M source/blender/blenlib/BLI_memory_utils.hh
===================================================================
diff --git a/source/blender/blenlib/BLI_memory_utils.hh b/source/blender/blenlib/BLI_memory_utils.hh
index 133615f0f31..b73e0e95312 100644
--- a/source/blender/blenlib/BLI_memory_utils.hh
+++ b/source/blender/blenlib/BLI_memory_utils.hh
@@ -194,10 +194,6 @@ template<typename T> void initialized_move_n(T *src, uint n, T *dst)
*/
template<typename T> void uninitialized_move_n(T *src, uint n, T *dst)
{
- static_assert(std::is_nothrow_move_constructible_v<T>,
- "Ideally, all types should have this property. We might have to remove this "
- "limitation of a real reason comes up.");
-
uint current = 0;
try {
for (; current < n; current++) {
More information about the Bf-blender-cvs
mailing list