[Orxonox-commit 6321] r10978 - code/branches/cpp11_v2/src/libraries/util
landauf at orxonox.net
landauf at orxonox.net
Fri Dec 25 23:27:35 CET 2015
Author: landauf
Date: 2015-12-25 23:27:35 +0100 (Fri, 25 Dec 2015)
New Revision: 10978
Modified:
code/branches/cpp11_v2/src/libraries/util/Math.h
code/branches/cpp11_v2/src/libraries/util/MultiType.h
Log:
added comments
Modified: code/branches/cpp11_v2/src/libraries/util/Math.h
===================================================================
--- code/branches/cpp11_v2/src/libraries/util/Math.h 2015-12-25 22:22:11 UTC (rev 10977)
+++ code/branches/cpp11_v2/src/libraries/util/Math.h 2015-12-25 22:27:35 UTC (rev 10978)
@@ -180,6 +180,7 @@
template <typename T>
inline T zeroise()
{
+ // If you reach this code, you abused zeroise()!
static_assert(sizeof(T) != sizeof(T), "No template specialization available for T");
}
Modified: code/branches/cpp11_v2/src/libraries/util/MultiType.h
===================================================================
--- code/branches/cpp11_v2/src/libraries/util/MultiType.h 2015-12-25 22:22:11 UTC (rev 10977)
+++ code/branches/cpp11_v2/src/libraries/util/MultiType.h 2015-12-25 22:27:35 UTC (rev 10978)
@@ -429,6 +429,7 @@
/// Creates a new value container (works only with specialized types).
template <typename T> inline void createNewValueContainer(const T& value)
{
+ // If you reach this code, you used MultiType with an unsupported type T
static_assert(sizeof(T) != sizeof(T), "No template specialization available for T");
}
More information about the Orxonox-commit
mailing list