Index: src/include/assert.h
===================================================================
--- src/include/assert.h	(revision 12756dee7d391c28a44d49e064084ec25f625686)
+++ src/include/assert.h	(revision 03b812d251e4a970bd478186cbc6540e71a0fda7)
@@ -4,7 +4,7 @@
 // The contents of this file are covered under the licence agreement in the
 // file "LICENCE" distributed with Cforall.
-// 
-// assert.h -- 
-// 
+//
+// assert.h --
+//
 // Author           : Peter A. Buhr
 // Created On       : Thu Aug 18 13:19:26 2016
@@ -12,5 +12,7 @@
 // Last Modified On : Thu Aug 18 13:25:55 2016
 // Update Count     : 4
-// 
+//
+
+#pragma once
 
 #include_next <assert.h>
@@ -22,4 +24,11 @@
 void __assert_fail_f( const char *assertion, const char *file, unsigned int line, const char *function, const char *fmt, ... );
 
+template<typename T, typename U>
+static inline T safe_dynamic_cast(const U& src) {
+	T ret = dynamic_cast<T>(src);
+	assert(ret);
+	return ret;
+}
+
 // Local Variables: //
 // tab-width: 4 //
