Changeset 2298f728 for src/Common
- Timestamp:
- Sep 24, 2016, 12:08:02 PM (8 years ago)
- 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:
- 9c23f31
- Parents:
- 1b772749
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Common/utility.h
r1b772749 r2298f728 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Sep 16 19:13:21201613 // Update Count : 2 612 // Last Modified On : Fri Sep 23 11:46:47 2016 13 // Update Count : 28 14 14 // 15 15 … … 102 102 } // if 103 103 } // for 104 }105 106 static inline std::string assign_strptr( const std::string *str ) {107 std::string tmp( *str );108 delete str;109 return tmp;110 104 } 111 105 … … 137 131 138 132 template < typename T > 139 void toString_single 133 void toString_single( std::ostream & os, const T & value ) { 140 134 os << value; 141 135 } 142 136 143 137 template < typename T, typename... Params > 144 void toString_single 138 void toString_single( std::ostream & os, const T & value, const Params & ... params ) { 145 139 os << value; 146 140 toString_single( os, params ... ); … … 148 142 149 143 template < typename ... Params > 150 std::string toString 144 std::string toString( const Params & ... params ) { 151 145 std::ostringstream os; 152 146 toString_single( os, params... );
Note: See TracChangeset
for help on using the changeset viewer.