18 #ifndef ION_BASE_INVALID_H_
19 #define ION_BASE_INVALID_H_
34 template <
typename T>
static const T& InvalidReference() {
42 return &value == &InvalidReference<T>();
50 return static_cast<EnumType
>(bad_value);
56 #endif // ION_BASE_INVALID_H_
bool IsInvalidReference(const T &value)
IsInvalidReference() returns true if a passed const reference of type T has an address of InvalidRefe...
const size_t kInvalidIndex
kInvalidIndex is a size_t value that is very unlikely to be a valid index.
EnumType InvalidEnumValue()
InvalidEnumValue() returns an invalid enum value, assuming that -1 is not a valid value...