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 }
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
Typedefs for easier changing of types.
Definition: pytypes.h:2012
gtsam::enable_if_t< needs_eigen_aligned_allocator< T >::value, std::shared_ptr< T > > make_shared(Args &&... args)
Definition: make_shared.h:56
STL compatible allocator to use with types requiring a non standrad alignment.
Definition: Memory.h:878
Eigen::Triplet< double > T
traits
Definition: chartTesting.h:28


gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:34:35