Allow to store pointers in ProductManifold

Change-Id: I32df7afab3a195efb0407b0d8f35dcd2d7cb95d2
This commit is contained in:
Sergiu Deitsch
2022-03-03 16:08:34 +01:00
committed by Sameer Agarwal
parent 9afe8cc45e
commit b0aef211db
3 changed files with 76 additions and 9 deletions
+7
View File
@@ -1548,6 +1548,13 @@ Manifolds can be copied and moved to :class:`ProductManifold`:
ProductManifold<SubsetManifold, SubsetManifold> manifold(manifold1,
manifold2);
In advanced use cases, manifolds can be dynamically allocated and passed as (smart) pointers:
.. code-block:: c++
ProductManifold<std::unique_ptr<QuaternionManifold>, EuclideanManifold<3>> se3
{std::make_unique<QuaternionManifold>(), EuclideanManifold<3>{}};
In C++17, the template parameters can be left out as they are automatically
deduced making the initialization much simpler: