Ignore:
Timestamp:
Oct 29, 2019, 4:01:24 PM (6 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
773db65, 9421f3d8
Parents:
7951100 (diff), 8364209 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/include/cassert

    r7951100 rb067d9b  
    99// Author           : Peter A. Buhr
    1010// Created On       : Thu Aug 18 13:19:26 2016
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Aug  1 11:56:01 2017
    13 // Update Count     : 16
     11// Last Modified By : Andrew Beach
     12// Last Modified On : Mon Jun  3 13:11:00 2017
     13// Update Count     : 18
    1414//
    1515
     
    1919
    2020#include_next <cassert>
     21
     22#include <string>
     23
     24template < typename ... Params >
     25std::string toString( const Params & ... params );
    2126
    2227#ifdef NDEBUG
     
    4045template<typename T, typename U>
    4146static inline T strict_dynamic_cast( const U & src ) {
     47        assert(src);
    4248        T ret = dynamic_cast<T>(src);
    4349        assertf(ret, "%s", toString(src).c_str());
     
    4551}
    4652
     53template<typename T, decltype(nullptr) null, typename U>
     54static inline T strict_dynamic_cast( const U & src ) {
     55        return src ? strict_dynamic_cast<T, U>( src ) : nullptr;
     56}
     57
     58extern void abort(const char *fmt, ...  ) noexcept __attribute__((noreturn, format(printf, 1, 2)));
    4759// Local Variables: //
    4860// tab-width: 4 //
Note: See TracChangeset for help on using the changeset viewer.