gtsam  4.1.0
gtsam
make_shared.h File Reference

make_shared trampoline function to ensure proper alignment More...

Go to the source code of this file.

Namespaces

 gtsam
 Global functions in a separate testing namespace.
 

Typedefs

template<bool B, class T = void>
using gtsam::enable_if_t = typename std::enable_if< B, T >::type
 An shorthand alias for accessing the ::type inside std::enable_if that can be used in a template directly.
 

Functions

template<typename T , typename ... Args>
gtsam::enable_if_t< needs_eigen_aligned_allocator< T >::value, boost::shared_ptr< T > > gtsam::make_shared (Args &&... args)
 Add our own make_shared as a layer of wrapping on boost::make_shared This solves the problem with the stock make_shared that custom alignment is not respected, causing SEGFAULTs at runtime, which is notoriously hard to debug. More...
 
template<typename T , typename ... Args>
gtsam::enable_if_t<!needs_eigen_aligned_allocator< T >::value, boost::shared_ptr< T > > gtsam::make_shared (Args &&... args)
 Fall back to the boost version if no need for alignment.
 

Detailed Description

make_shared trampoline function to ensure proper alignment

Author
Fan Jiang