Index: src/Common/SemanticError.h
===================================================================
--- src/Common/SemanticError.h	(revision 9d1e3f75d320ba7456c59ec8700423ad2c448c0a)
+++ src/Common/SemanticError.h	(revision 9dc31c106f1a43094de3a5a6e85d3125948b4ef9)
@@ -10,6 +10,6 @@
 // Created On       : Mon May 18 07:44:20 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Tue Aug 29 22:03:36 2017
-// Update Count     : 17
+// Last Modified On : Wed Apr 18 16:28:16 2018
+// Update Count     : 18
 //
 
@@ -39,4 +39,5 @@
 	"self assignment of expression: %s",
 	"rvalue to reference conversion of rvalue: %s",
+	"questionable use of type qualifier %s with %s",
 };
 
@@ -44,4 +45,5 @@
 	SelfAssignment,
 	RvalueToReferenceConversion,
+	BadQualifiersZeroOne,
 	NUMBER_OF_WARNINGS, //This MUST be the last warning
 };
Index: src/Common/utility.h
===================================================================
--- src/Common/utility.h	(revision 9d1e3f75d320ba7456c59ec8700423ad2c448c0a)
+++ src/Common/utility.h	(revision 9dc31c106f1a43094de3a5a6e85d3125948b4ef9)
@@ -9,7 +9,7 @@
 // Author           : Richard C. Bilson
 // Created On       : Mon May 18 07:44:20 2015
-// Last Modified By : Andrew Beach
-// Last Modified On : Thr Aug 17 11:38:00 2017
-// Update Count     : 34
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Thu Apr 19 16:21:44 2018
+// Update Count     : 37
 //
 
@@ -436,4 +436,18 @@
 }
 
+// -----------------------------------------------------------------------------
+// O(1) polymorphic integer log2, using clz, which returns the number of leading 0-bits, starting at the most
+// significant bit (single instruction on x86)
+
+template<typename T>
+inline constexpr T log2(const T & t) {
+	if ( std::is_integral<T>::value ) {
+		const constexpr int r = sizeof(t) * __CHAR_BIT__ - 1;
+		if ( sizeof(T) == sizeof(unsigned int ) ) return r - __builtin_clz( t );
+		if ( sizeof(T) == sizeof(unsigned long) ) return r - __builtin_clzl( t );
+		if ( sizeof(T) == sizeof(unsigned long long) ) return r - __builtin_clzll( t );
+	} // if
+	return -1;
+}
 
 
