45 #ifndef _TEUCHOS_ORDINALTRAITS_HPP_ 46 #define _TEUCHOS_ORDINALTRAITS_HPP_ 77 static inline T
notDefined() {
return T::this_type_is_missing_a_specialization(); }
84 static const bool hasMachineParameters =
false;
105 #ifndef DOXYGEN_SHOULD_SKIP_THIS 109 static const bool hasMachineParameters =
false;
110 static inline char zero() {
return(0);}
111 static inline char one() {
return(1);}
112 static inline char invalid() {
return(std::numeric_limits<char>::max());}
113 static inline char max() {
return(std::numeric_limits<char>::max()-one());}
114 static inline std::string name() {
return(
"char");}
119 static const bool hasMachineParameters =
false;
120 static inline short int zero() {
return(0);}
121 static inline short int one() {
return(1);}
122 static inline short int invalid() {
return(-1);}
123 static inline short int max() {
return(std::numeric_limits<short int>::max());}
124 static inline std::string name() {
return(
"short int");}
129 static const bool hasMachineParameters =
false;
130 static inline int zero() {
return(0);}
131 static inline int one() {
return(1);}
132 static inline int invalid() {
return(-1);}
133 static inline int max() {
return(std::numeric_limits<int>::max());}
134 static inline std::string name() {
return(
"int");}
139 static const bool hasMachineParameters =
false;
140 static inline unsigned int zero() {
return(0);}
141 static inline unsigned int one() {
return(1);}
142 static inline unsigned int invalid() {
return(std::numeric_limits<unsigned int>::max());}
143 static inline unsigned int max() {
return(std::numeric_limits<unsigned int>::max()-1);}
144 static inline std::string name() {
return(
"unsigned int");}
149 static const bool hasMachineParameters =
false;
150 static inline long int zero() {
return(static_cast<long int>(0));}
151 static inline long int one() {
return(static_cast<long int>(1));}
152 static inline long int invalid() {
return(static_cast<long int>(-1));}
153 static inline long int max() {
return(std::numeric_limits<long int>::max());}
154 static inline std::string name() {
return(
"long int");}
159 static const bool hasMachineParameters =
false;
160 static inline long unsigned int zero() {
return(static_cast<long unsigned int>(0));}
161 static inline long unsigned int one() {
return(static_cast<long unsigned int>(1));}
162 static inline long unsigned int invalid() {
return(std::numeric_limits<long unsigned int>::max());}
163 static inline long unsigned int max() {
return(std::numeric_limits<long unsigned int>::max()-1);}
164 static inline std::string name() {
return(
"long unsigned int");}
167 #ifdef HAVE_TEUCHOS_LONG_LONG_INT 170 static const bool hasMachineParameters =
false;
171 static inline long long int zero() {
return(static_cast<long long int>(0));}
172 static inline long long int one() {
return(static_cast<long long int>(1));}
173 static inline long long int invalid() {
return(static_cast<long long int>(-1));}
174 static inline long long int max() {
return(LLONG_MAX);}
175 static inline std::string name() {
return(
"long long int");}
177 #endif // HAVE_TEUCHOS_LONG_LONG_INT 179 #ifdef HAVE_TEUCHOS___INT64 183 static const bool hasMachineParameters =
false;
184 static inline __int64 zero() {
return(static_cast<__int64>(0));}
185 static inline __int64 one() {
return(static_cast<__int64>(1));}
186 static inline __int64 invalid() {
return(std::numeric_limits<__int64>::max());}
187 static inline __int64 max() {
return(std::numeric_limits<__int64>::max()-1);}
188 static inline std::string name() {
return(
"__int64");}
193 static const bool hasMachineParameters =
false;
194 static inline unsigned __int64 zero() {
return(static_cast<unsigned __int64>(0));}
195 static inline unsigned __int64 one() {
return(static_cast<unsigned __int64>(1));}
196 static inline unsigned __int64 invalid() {
return(std::numeric_limits<unsigned __int64>::max());}
197 static inline unsigned __int64 max() {
return(std::numeric_limits<unsigned __int64>::max()-1);}
198 static inline std::string name() {
return(
"unsigned __int64");}
201 #endif // HAVE_TEUCHOS___INT64 203 #endif // DOXYGEN_SHOULD_SKIP_THIS 207 #endif // _TEUCHOS_ORDINALTRAITS_HPP_ static T one()
Returns representation of one for this ordinal type.
static T zero()
Returns representation of zero for this ordinal type.
static T invalid()
Returns a value designating an invalid number. For signed types, this is typically negative one; for ...
Teuchos header file which uses auto-configuration information to include necessary C++ headers...
static T max()
Returns a value designating the maximum value accessible by code using OrdinalTraits.
This structure defines some basic traits for the ordinal field type.
static T notDefined()
This function should not compile if there is an attempt to instantiate!
static std::string name()
Returns name of this ordinal type.