Changeset 7ff30d07 for src/Common


Ignore:
Timestamp:
Jun 14, 2016, 1:23:18 PM (9 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, 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:
545ef59, c738ca4, ee51534
Parents:
6cbc25a (diff), c8c03683 (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

Conflicts:

Makefile.in
aclocal.m4
configure
src/Makefile.in
src/Tests/Context.c
src/driver/Makefile.in
src/examples/Makefile.in
src/examples/ctxts.c
src/examples/esskaykay.c
src/libcfa/Makefile.in

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Common/utility.h

    r6cbc25a r7ff30d07  
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Rob Schluntz
    12 // Last Modified On : Thu Apr 28 13:18:24 2016
    13 // Update Count     : 16
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Wed Jun  8 17:33:59 2016
     13// Update Count     : 22
    1414//
    1515
     
    3333}
    3434
     35template<typename T, typename U>
     36struct maybeBuild_t {
     37        static T * doit( const U *orig ) {
     38                if ( orig ) {
     39                        return orig->build();
     40                } else {
     41                        return 0;
     42                } // if
     43        }
     44};
     45
    3546template< typename T, typename U >
    3647static inline T * maybeBuild( const U *orig ) {
    37         if ( orig ) {
    38                 return orig->build();
    39         } else {
    40                 return 0;
    41         } // if
     48        return maybeBuild_t<T,U>::doit(orig);
    4249}
    4350
Note: See TracChangeset for help on using the changeset viewer.