diff options
Diffstat (limited to 'runtimes/neurun/src/graph/Index.h')
-rw-r--r-- | runtimes/neurun/src/graph/Index.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/runtimes/neurun/src/graph/Index.h b/runtimes/neurun/src/graph/Index.h index 864aaffd0..3263d12ad 100644 --- a/runtimes/neurun/src/graph/Index.h +++ b/runtimes/neurun/src/graph/Index.h @@ -18,6 +18,7 @@ #define __NEURUN_GRAPH_INDEX_H__ #include <functional> +#include <limits> #include <stdint.h> namespace neurun @@ -27,7 +28,11 @@ namespace graph template <typename T, typename DummyTag> class Index { +private: + static const T UNDEFINED = std::numeric_limits<T>::max(); + public: + explicit Index(void) : _index{UNDEFINED} {} explicit Index(T o) : _index{o} {} explicit Index(int32_t o) : _index{static_cast<T>(o)} {} // For legacy code compatibility Index(const Index &o) : _index{o._index} {} |