From 5aa027d172d19ff959e1f1cf558153381554705b Mon Sep 17 00:00:00 2001 From: Max Lyon Date: Mon, 15 Mar 2021 17:11:34 +0100 Subject: [PATCH] add test that checks if a property of type std::vector with T not having a default constructor can be cerated --- src/Unittests/unittests_propertymanager.cc | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/Unittests/unittests_propertymanager.cc b/src/Unittests/unittests_propertymanager.cc index d620f3ec..ee037768 100644 --- a/src/Unittests/unittests_propertymanager.cc +++ b/src/Unittests/unittests_propertymanager.cc @@ -878,4 +878,24 @@ TEST_F(OpenMeshPropertyManager, mesh_property_initialization) { + +TEST_F(OpenMeshPropertyManager, property_without_default_constructor ) { + + // just check if this compiles + + struct NoDefaultConstructor + { + int val; + NoDefaultConstructor() = delete; + NoDefaultConstructor(int i) : val(i) {} + }; + + OpenMesh::VProp> vprop(mesh_); + OpenMesh::HProp> hprop(mesh_); + OpenMesh::EProp> eprop(mesh_); + OpenMesh::FProp> fprop(mesh_); + OpenMesh::MProp> mprop(mesh_); +} + + }