Changes in src/Common/utility.h [940bba3:2298f728]
- File:
-
- 1 edited
-
src/Common/utility.h (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Common/utility.h
r940bba3 r2298f728 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Jun 8 17:33:59201613 // Update Count : 2 212 // Last Modified On : Fri Sep 23 11:46:47 2016 13 // Update Count : 28 14 14 // 15 15 … … 25 25 #include <sstream> 26 26 #include <string> 27 #include <cassert> 27 28 28 29 template< typename T > … … 101 102 } // if 102 103 } // 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 } // if114 104 } 115 105 … … 141 131 142 132 template < typename T > 143 void toString_single ( std::ostream & os, const T & value ) {133 void toString_single( std::ostream & os, const T & value ) { 144 134 os << value; 145 135 } 146 136 147 137 template < typename T, typename... Params > 148 void toString_single ( std::ostream & os, const T & value, const Params & ... params ) {138 void toString_single( std::ostream & os, const T & value, const Params & ... params ) { 149 139 os << value; 150 140 toString_single( os, params ... ); … … 152 142 153 143 template < typename ... Params > 154 std::string toString ( const Params & ... params ) {144 std::string toString( const Params & ... params ) { 155 145 std::ostringstream os; 156 146 toString_single( os, params... );
Note:
See TracChangeset
for help on using the changeset viewer.