Changeset 4f147cc for src/include
- Timestamp:
- Aug 19, 2016, 5:04:59 PM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- d30790f
- Parents:
- 2037f82
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/include/assert.h
r2037f82 r4f147cc 4 4 // The contents of this file are covered under the licence agreement in the 5 5 // file "LICENCE" distributed with Cforall. 6 // 7 // assert.h -- 8 // 6 // 7 // assert.h -- 8 // 9 9 // Author : Peter A. Buhr 10 10 // Created On : Thu Aug 18 13:19:26 2016 … … 12 12 // Last Modified On : Thu Aug 18 13:25:55 2016 13 13 // Update Count : 4 14 // 14 // 15 16 #pragma once 15 17 16 18 #include_next <assert.h> … … 22 24 void __assert_fail_f( const char *assertion, const char *file, unsigned int line, const char *function, const char *fmt, ... ); 23 25 26 template<typename T, typename U> 27 static inline T safe_dynamic_cast(const U& src) { 28 T ret = dynamic_cast<T>(src); 29 assert(ret); 30 return ret; 31 } 32 24 33 // Local Variables: // 25 34 // tab-width: 4 //
Note: See TracChangeset
for help on using the changeset viewer.