GTSAM  4.0.2
C++ library for smoothing and mapping (SAM)
gtsam::needs_eigen_aligned_allocator< typename, typename > Struct Template Reference

#include <types.h>

Inheritance diagram for gtsam::needs_eigen_aligned_allocator< typename, typename >:
Inheritance graph
[legend]
Collaboration diagram for gtsam::needs_eigen_aligned_allocator< typename, typename >:
Collaboration graph
[legend]

Detailed Description

template<typename, typename = void_t<>>
struct gtsam::needs_eigen_aligned_allocator< typename, typename >

A SFINAE trait to mark classes that need special alignment.

This is required to make std::make_shared and etc respect alignment, which is essential for the Python wrappers to work properly.

Explanation

When a GTSAM type is not declared with the type alias _eigen_aligned_allocator_trait = void, the first template will be taken so needs_eigen_aligned_allocator will be resolved to std::false_type.

Otherwise, it will resolve to the second template, which will be resolved to std::true_type.

Please refer to gtsam/base/make_shared.h for an example.


The documentation for this struct was generated from the following file: