Changes in src/Common/utility.h [138e29e:4a9ccc3]
- File:
-
- 1 edited
-
src/Common/utility.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Common/utility.h
r138e29e r4a9ccc3 25 25 #include <sstream> 26 26 #include <string> 27 28 27 #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 }324 305 #endif // _UTILITY_H 325 306
Note:
See TracChangeset
for help on using the changeset viewer.