scalar-conversion.hpp
Go to the documentation of this file.
1 //
2 // Copyright (c) 2014-2024 CNRS INRIA
3 //
4 
5 #ifndef __eigenpy_scalar_conversion_hpp__
6 #define __eigenpy_scalar_conversion_hpp__
7 
8 #include "eigenpy/config.hpp"
9 #include <boost/numeric/conversion/conversion_traits.hpp>
10 #include <complex>
11 
12 namespace eigenpy {
13 
14 template <typename Source, typename Target>
16  : public boost::mpl::if_c<std::is_same<Source, Target>::value,
17  std::true_type,
18  typename boost::numeric::conversion_traits<
19  Source, Target>::subranged>::type {};
20 
22 template <typename ScalarSource, typename ScalarTarget>
23 struct FromTypeToType<std::complex<ScalarSource>, std::complex<ScalarTarget> >
24  : public boost::mpl::if_c<
25  std::is_same<ScalarSource, ScalarTarget>::value, std::true_type,
26  typename boost::numeric::conversion_traits<
27  ScalarSource, ScalarTarget>::subranged>::type {};
28 
29 } // namespace eigenpy
30 
31 #endif // __eigenpy_scalar_conversion_hpp__
eigenpy
Definition: alignment.hpp:14
eigenpy::FromTypeToType
Definition: scalar-conversion.hpp:15


eigenpy
Author(s): Justin Carpentier, Nicolas Mansard
autogenerated on Sat Nov 2 2024 02:14:45