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 #include <boost/make_shared.hpp>
25 
26 #include <type_traits>
27 
28 namespace gtsam {
30  template<bool B, class T = void>
32 }
33 
34 namespace gtsam {
35 
56  template<typename T, typename ... Args>
58  return boost::allocate_shared<T>(Eigen::aligned_allocator<T>(), std::forward<Args>(args)...);
59  }
60 
62  template<typename T, typename ... Args>
64  return boost::make_shared<T>(std::forward<Args>(args)...);
65  }
66 
67 }
gtsam::enable_if_t< needs_eigen_aligned_allocator< T >::value, boost::shared_ptr< T > > make_shared(Args &&...args)
Definition: make_shared.h:57
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 direct...
Definition: make_shared.h:31
Typedefs for easier changing of types.
Definition: pytypes.h:1322
STL compatible allocator to use with types requiring a non standrad alignment.
Definition: Memory.h:721
Eigen::Triplet< double > T
traits
Definition: chartTesting.h:28


gtsam
Author(s):
autogenerated on Sat May 8 2021 02:42:35