Changeset 9feb34b for src/Common
- Timestamp:
- Mar 29, 2023, 11:07:03 AM (17 months ago)
- Branches:
- ADT, ast-experimental, master
- Children:
- afdb74b
- Parents:
- 60380a1
- Location:
- src/Common
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Common/DeclStats.cpp
r60380a1 r9feb34b 23 23 #include <iostream> 24 24 #include <map> 25 #include <sstream> 25 26 #include <unordered_map> 26 27 #include <unordered_set> -
src/Common/ResolvProtoDump.cpp
r60380a1 r9feb34b 19 19 #include <iostream> 20 20 #include <set> 21 #include <sstream> 21 22 #include <unordered_set> 22 23 … … 26 27 #include "AST/Type.hpp" 27 28 #include "CodeGen/OperatorTable.h" 28 #include "Common/utility.h"29 29 30 30 namespace { -
src/Common/module.mk
r60380a1 r9feb34b 52 52 Common/Stats/Time.cc \ 53 53 Common/Stats/Time.h \ 54 Common/ToString.hpp \ 54 55 Common/UniqueName.cc \ 55 56 Common/UniqueName.h \ -
src/Common/utility.h
r60380a1 r9feb34b 22 22 #include <list> 23 23 #include <memory> 24 #include <sstream>25 24 #include <string> 26 25 #include <type_traits> … … 143 142 dst.swap( src ); 144 143 } 145 146 template < typename T >147 void toString_single( std::ostream & os, const T & value ) {148 os << value;149 }150 151 template < typename T, typename... Params >152 void toString_single( std::ostream & os, const T & value, const Params & ... params ) {153 os << value;154 toString_single( os, params ... );155 }156 157 template < typename ... Params >158 std::string toString( const Params & ... params ) {159 std::ostringstream os;160 toString_single( os, params... );161 return os.str();162 }163 164 #define toCString( ... ) toString( __VA_ARGS__ ).c_str()165 144 166 145 template< typename... Args >
Note: See TracChangeset
for help on using the changeset viewer.