Skip to content
Snippets Groups Projects
Unverified Commit 3225c5d8 authored by lintao@ihep.ac.cn's avatar lintao@ihep.ac.cn Committed by GitHub
Browse files

Merge pull request #65 from joequant/fix/not-in-range

fix not in range compile error
parents 039c6702 74dc231d
No related branches found
No related tags found
No related merge requests found
......@@ -15,11 +15,11 @@
namespace nnclu {
/** fast check if integer is in a given range [Min,Max] */
template <unsigned Min,unsigned Max >
template <int Min, int Max >
inline bool inRange( int i){ return ( (unsigned int) ( i - Min ) <= (unsigned int) ( Max - Min ) ); }
/** fast check if integer is not in a given range [Min,Max] */
template <unsigned Min,unsigned Max >
template <int Min, int Max >
inline bool notInRange( int i){ return ( (unsigned int) ( i - Min ) > (unsigned int) ( Max - Min ) ); }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment