make_shared.h
Go to the documentation of this file.
1 /* ----------------------------------------------------------------------------
2 
3  * GTSAM Copyright 2020, Georgia Tech Research Corporation,
4  * Atlanta, Georgia 30332-0415
5  * All Rights Reserved
6  * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
7 
8  * See LICENSE for the license information
9 
10  * -------------------------------------------------------------------------- */
11 
18 #pragma once
19 
20 #include <gtsam/base/types.h>
21 
22 #include <Eigen/Core>
23 
24 
25 #include <type_traits>
26 
27 namespace gtsam {
29  template<bool B, class T = void>
31 }
32 
33 namespace gtsam {
34 
55  template<typename T, typename ... Args>
57  return std::allocate_shared<T>(Eigen::aligned_allocator<T>(), std::forward<Args>(args)...);
58  }
59 
61  template<typename T, typename ... Args>
63  return std::make_shared<T>(std::forward<Args>(args)...);
64  }
65 
66 }
gtsam.examples.DogLegOptimizerExample.type
type
Definition: DogLegOptimizerExample.py:111
types.h
Typedefs for easier changing of types.
gtsam::enable_if_t
typename std::enable_if< B, T >::type enable_if_t
An shorthand alias for accessing the ::type inside std::enable_if that can be used in a template dire...
Definition: make_shared.h:30
T
Eigen::Triplet< double > T
Definition: Tutorial_sparse_example.cpp:6
Eigen::aligned_allocator
STL compatible allocator to use with types requiring a non standrad alignment.
Definition: Memory.h:878
gtsam::make_shared
gtsam::enable_if_t< needs_eigen_aligned_allocator< T >::value, std::shared_ptr< T > > make_shared(Args &&... args)
Definition: make_shared.h:56
gtsam
traits
Definition: SFMdata.h:40
args
Definition: pytypes.h:2210


gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:02:44