7#include <gtsam/config.h>
8#include <gtsam/base/make_shared.h>
9#include <gtsam/base/Matrix.h>
11namespace gtsam_points {
13#if GTSAM_VERSION_NUMERIC >= 40300
16using shared_ptr = std::shared_ptr<T>;
19using weak_ptr = std::weak_ptr<T>;
21template <
class T,
class U>
22auto dynamic_pointer_cast(
const std::shared_ptr<U>& sp) -> std::shared_ptr<T> {
23 return std::dynamic_pointer_cast<T>(sp);
27using optional = std::optional<T>;
29using OptionalMatrixType = gtsam::Matrix*;
30using OptionalMatrixVecType = std::vector<gtsam::Matrix>*;
32constexpr auto NoneValue =
nullptr;
37using shared_ptr = boost::shared_ptr<T>;
40using weak_ptr = boost::weak_ptr<T>;
42template <
class T,
class U>
43auto dynamic_pointer_cast(
const boost::shared_ptr<U>& sp) -> boost::shared_ptr<T> {
44 return boost::dynamic_pointer_cast<T>(sp);
48using optional = boost::optional<T>;
50using OptionalMatrixType = boost::optional<gtsam::Matrix&>;
51using OptionalMatrixVecType = boost::optional<std::vector<gtsam::Matrix>&>;
52constexpr auto NoneValue = boost::none;