diff --git a/libsrc/core/array.hpp b/libsrc/core/array.hpp index df28b098..90018182 100644 --- a/libsrc/core/array.hpp +++ b/libsrc/core/array.hpp @@ -749,15 +749,16 @@ namespace ngcore NETGEN_INLINE explicit Array (const Array & a2) : FlatArray (a2.Size(), a2.Size() ? new T[a2.Size()] : nullptr) { - if constexpr (std::is_copy_assignable::value) + static_assert(std::is_copy_assignable::value, "cannot copy-construct Array"); + // if constexpr (std::is_copy_assignable::value) { allocsize = size; mem_to_delete = data; for (size_t i = 0; i < size; i++) data[i] = a2.data[i]; } - else - throw Exception(std::string("cannot copy-construct Array of type ") + typeid(T).name()); + // else + // throw Exception(std::string("cannot copy-construct Array of type ") + typeid(T).name()); }