ReFRACtor
fill_value.h
Go to the documentation of this file.
1 #ifndef FILL_VALUE_H
2 #define FILL_VALUE_H
3 
4 // If we were using C++14 we could use variable templates
5 // but this work around keeps things from getting too verbose
6 template<typename T> static constexpr T fill_value();
7 
8 template<> constexpr float fill_value() { return -999999.0F; }
9 template<> constexpr double fill_value() { return -999999.0; }
10 template<> constexpr signed char fill_value() { return -127; }
11 template<> constexpr short fill_value() { return -32767; }
12 template<> constexpr int fill_value() { return -2147483647; }
13 template<> constexpr long long fill_value() { return -9223372036854775807LL; }
14 template<> constexpr unsigned char fill_value() { return 254; }
15 template<> constexpr unsigned short fill_value() { return 65534; }
16 template<> constexpr unsigned int fill_value() { return 4294967294U; }
17 template<> constexpr unsigned long long fill_value() { return 18446744073709551614ULL; }
18 
19 #endif
constexpr float fill_value()
Definition: fill_value.h:8

Copyright © 2017, California Institute of Technology.
ALL RIGHTS RESERVED.
U.S. Government Sponsorship acknowledged.
Generated Fri Aug 24 2018 15:44:11