ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkIsNumber.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright NumFOCUS
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * https://www.apache.org/licenses/LICENSE-2.0.txt
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 *=========================================================================*/
18
19#ifndef itkIsNumber_h
20#define itkIsNumber_h
21
23#include "itkIntTypes.h"
24
25
27namespace itk::mpl
28{
35template <typename T>
36struct IsNumber : FalseType
37{};
38
40template <>
41struct IsNumber<unsigned char> : TrueType
42{};
43template <>
44struct IsNumber<signed char> : TrueType
45{};
46template <>
47struct IsNumber<unsigned short> : TrueType
48{};
49template <>
50struct IsNumber<short> : TrueType
51{};
52template <>
53struct IsNumber<int> : TrueType
54{};
55template <>
56struct IsNumber<unsigned int> : TrueType
57{};
58template <>
59struct IsNumber<long> : TrueType
60{};
61template <>
62struct IsNumber<unsigned long> : TrueType
63{};
64template <>
65struct IsNumber<long long> : TrueType
66{};
67template <>
68struct IsNumber<unsigned long long> : TrueType
69{};
70template <>
71struct IsNumber<float> : TrueType
72{};
73template <>
74struct IsNumber<double> : TrueType
75{};
76template <>
77struct IsNumber<long double> : TrueType
78{};
80
81} // namespace itk::mpl
83
84#endif // itkIsNumber_h