vtk-m/vtkm/internal
Kenneth Moreland e3dfa48910 Do not attempt to move non-trivial objects in Variant
The `Variant` class has separate implementations for its move and copy
constructors/assignment operators depending on whether the classes it
holds can be trivially moved. If the objects are trivial, Variant is
trivial as well. However, in the case where the objects are not trivial,
special construction and copying needs to be done.

Previously, the non-trivial `Variant` defined a move constructor that
did a byte copy of the contained object and reset the right hand side
object so that it did not attempt to destroy the object. That usually
works because it guarantees that only one version of the `Variant` will
attempt to destroy the object and its resources should be cleaned up
correctly.

But C++ is a funny language that lets you do weird things. Turns out
there are cases where moving the location of memory for an object
without calling the proper copy method can invalidate the object. For
example, if the object holds a pointer to one of its own members, that
pointer will become invalid. Also, if it points to something that points
back, then the object will need to update those pointers when it is
moved. GCC's version of `std::string` seems to be a type like this.

Solve the problem by simply deleting the move constructors. The copy
constructors and destructor will be called instead to properly manage
the object. A test for these conditions is added to `UnitTestVariant`.
2020-11-09 12:48:10 -07:00
..
testing Make separate exec and cont versions of Variant 2020-11-09 12:48:10 -07:00
.gitattributes clang-format: apply to the entire tree 2017-05-25 07:51:37 -04:00
ArrayPortalBasic.h Replace basic ArrayHandle implementation to use Buffers 2020-06-25 14:02:26 -06:00
ArrayPortalHelpers.h Properly handle Get(Id3) in ArrayPortalCheck 2020-03-18 10:51:20 -06:00
ArrayPortalUniformPointCoordinates.h Update ArrayHandleImplicit to new array style with Buffer 2020-10-21 08:36:29 -06:00
ArrayPortalValueReference.h Use noexcept instead of throw() as it was deprecated in c++11 2020-01-13 10:05:35 -05:00
ArrayPortalVirtual.h clang-format: reformat the repository with clang-format-9 2020-08-24 14:01:08 -04:00
Assume.h clang-format: reformat the repository with clang-format-9 2020-08-24 14:01:08 -04:00
brigand.hpp Fix brigand for CUDA 10.2. 2019-12-18 15:51:59 -05:00
CMakeLists.txt Make separate exec and cont versions of Variant 2020-11-09 12:48:10 -07:00
Configure.h.in Disable VTKM_ASSERT when using HIP 2020-09-25 11:06:57 -04:00
ConfigureFor32.h conslidate the license statement 2019-04-17 10:57:13 -06:00
ConfigureFor64.h conslidate the license statement 2019-04-17 10:57:13 -06:00
ConnectivityStructuredInternals.h Refactor topology mappings to clarify meaning. 2019-08-06 11:27:26 -04:00
DecayHelpers.h Make Tuple class 2020-03-16 17:12:16 -06:00
ExportMacros.h VTK-m defines VTKM_EXEC / VTKM_EXEC_CONT when compiling with HIP 2020-09-25 11:06:34 -04:00
FunctionInterface.h Suppress bad deprecation warnings in MSVC 2020-07-14 16:25:04 -06:00
FunctionInterfaceDetailPost.h Simplify FunctionInterface 2019-12-02 09:33:35 -05:00
FunctionInterfaceDetailPost.h.in Simplify FunctionInterface 2019-12-02 09:33:35 -05:00
FunctionInterfaceDetailPre.h Another round of simplifications to FunctionInterface 2019-12-04 14:02:44 -05:00
FunctionInterfaceDetailPre.h.in Another round of simplifications to FunctionInterface 2019-12-04 14:02:44 -05:00
IndexTag.h conslidate the license statement 2019-04-17 10:57:13 -06:00
IndicesExtrude.h Update VTK-m code to use new Vec aliases 2019-07-31 12:55:40 -06:00
Invocation.h Correct warnings found with CUDA 10.2 + gcc 4.8.5 2020-02-26 15:16:35 -05:00
Unreachable.h clang-format: reformat the repository with clang-format-9 2020-08-24 14:01:08 -04:00
VariantImpl.h Do not attempt to move non-trivial objects in Variant 2020-11-09 12:48:10 -07:00
VariantImplDetail.h Do not attempt to move non-trivial objects in Variant 2020-11-09 12:48:10 -07:00
VariantImplDetail.h.in Do not attempt to move non-trivial objects in Variant 2020-11-09 12:48:10 -07:00
VecOperators.h vtkm::Vec: added unrolled arithmetic operators overload 2020-09-03 16:10:15 -04:00
VecOperators.h.in vtkm::Vec: added unrolled arithmetic operators overload 2020-09-03 16:10:15 -04:00
Windows.h conslidate the license statement 2019-04-17 10:57:13 -06:00