Changes in src/Common/utility.h [4a9ccc3:138e29e]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Common/utility.h
r4a9ccc3 r138e29e 25 25 #include <sstream> 26 26 #include <string> 27 27 28 #include <cassert> 28 29 29 template< typename T > 30 30 static inline T * maybeClone( const T *orig ) { … … 303 303 return group_iterate_t<Args...>(args...); 304 304 } 305 306 struct CodeLocation { 307 int linenumber; 308 std::string filename; 309 310 CodeLocation() 311 : linenumber( -1 ) 312 , filename("") 313 {} 314 315 CodeLocation( const char* filename, int lineno ) 316 : linenumber( lineno ) 317 , filename(filename ? filename : "") 318 {} 319 }; 320 321 inline std::string to_string( const CodeLocation& location ) { 322 return location.linenumber >= 0 ? location.filename + ":" + std::to_string(location.linenumber) + " " : ""; 323 } 305 324 #endif // _UTILITY_H 306 325
Note: See TracChangeset
for help on using the changeset viewer.