scifir-units 2.0.0
scifir-units is a library of units of measurement, angles, coordinates, fields, and related data, all lightweight, that help in the development of scientific software and scientific machines
Loading...
Searching...
No Matches
is_number.hpp
Go to the documentation of this file.
1#ifndef SCIFIR_UNITS_UTIL_IS_NUMBER_HPP_INCLUDED
2#define SCIFIR_UNITS_UTIL_IS_NUMBER_HPP_INCLUDED
3
4#include <type_traits>
5
6using namespace std;
7
8namespace scifir
9{
10 template<class T>
11struct is_number : std::integral_constant < bool, is_same<short,T>::value || is_same<int,T>::value || is_same<long,T>::value || is_same<long long,T>::value || is_same<unsigned short,T>::value || is_same<unsigned int,T>::value || is_same<unsigned long,T>::value || is_same<unsigned long long,T>::value || is_floating_point<T>::value> {};
12
13 template<class T>
14struct is_integer_number : std::integral_constant < bool, is_same<short,T>::value || is_same<int,T>::value || is_same<long,T>::value || is_same<long long,T>::value || is_same<unsigned short,T>::value || is_same<unsigned int,T>::value || is_same<unsigned long,T>::value || is_same<unsigned long long,T>::value> {};
15}
16
17#endif // SCIFIR_UNITS_UTIL_IS_NUMBER_HPP_INCLUDED
The namespace scifir contains all scifir-units, excepting the string literals, which are outside.
Definition address.cpp:6