12 typename =
typename std::enable_if<std::is_arithmetic<NumericType>::value,
NumericType>::type
14 using vec = std::vector<NumericType> ;
17 typename =
typename std::enable_if<std::is_arithmetic<NumericType>::value,
NumericType>::type
19 using CosanMatrix = Eigen::Matrix<NumericType, Eigen::Dynamic, Eigen::Dynamic> ;
21 template <
typename NumericType=std::
string>
23 if constexpr (std::is_same_v<NumericType, unsigned long>) {
24 return std::stoul(arg);
26 else if constexpr (std::is_same_v<NumericType, unsigned long long>){
27 return std::stoull(arg);
29 else if constexpr (std::is_same_v<NumericType, int>){
30 return std::stoi(arg);
32 else if constexpr (std::is_same_v<NumericType, long>){
33 return std::stol(arg);
35 else if constexpr (std::is_same_v<NumericType, long long>){
36 return std::stoll(arg);
38 else if constexpr (std::is_same_v<NumericType, float>){
39 return std::stof(arg);
41 else if constexpr (std::is_same_v<NumericType, double>){
42 return std::stod(arg);
45 return std::stold(arg);
50 typename =
typename std::enable_if<std::is_arithmetic<NumericType>::value,
NumericType>::type>
55 static_assert(std::is_arithmetic<NumericType>::value,
"NumericType must be numeric");
60 static_assert(std::is_arithmetic<NumericType>::value,
"NumericType must be numeric");
70 std::cout<<X<<std::endl;
71 return std::accumulate(
a.begin(),
a.end(), 0);
93 std::cout<<a.
face<<std::endl;
94 static_assert(std::is_same_v<decltype(a.
face)::Scalar,
int>);
95 std::cout<<
typeid(decltype(a.
face)::Scalar).name()<<std::endl;