Ignore:
Timestamp:
Oct 4, 2016, 11:25:00 AM (9 years ago)
Author:
Aaron Moss <a3moss@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
40744af8, a7976d79
Parents:
6295081 (diff), 4b1fd2c (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/Common/utility.h

    r6295081 r19b5d6b  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Jun  8 17:33:59 2016
    13 // Update Count     : 22
     12// Last Modified On : Fri Sep 23 11:46:47 2016
     13// Update Count     : 28
    1414//
    1515
     
    2525#include <sstream>
    2626#include <string>
     27#include <cassert>
    2728
    2829template< typename T >
     
    101102                } // if
    102103        } // for
    103 }
    104 
    105 static inline std::string assign_strptr( const std::string *str ) {
    106         if ( str == 0 ) {
    107                 return "";
    108         } else {
    109                 std::string tmp;
    110                 tmp = *str;
    111                 delete str;
    112                 return tmp;
    113         } // if
    114104}
    115105
     
    141131
    142132template < typename T >
    143 void toString_single ( std::ostream & os, const T & value ) {
     133void toString_single( std::ostream & os, const T & value ) {
    144134        os << value;
    145135}
    146136
    147137template < typename T, typename... Params >
    148 void toString_single ( std::ostream & os, const T & value, const Params & ... params ) {
     138void toString_single( std::ostream & os, const T & value, const Params & ... params ) {
    149139        os << value;
    150140        toString_single( os, params ... );
     
    152142
    153143template < typename ... Params >
    154 std::string toString ( const Params & ... params ) {
     144std::string toString( const Params & ... params ) {
    155145        std::ostringstream os;
    156146        toString_single( os, params... );
Note: See TracChangeset for help on using the changeset viewer.