1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-06-12 20:27:06 +01:00

rudimentary appendShift convenience method, which allows the user to append an arbitrary shift in one line

This commit is contained in:
david clarke
2023-06-26 23:59:28 -06:00
parent eeb4703b84
commit a7eabaad56
2 changed files with 56 additions and 24 deletions

View File

@ -15,13 +15,13 @@ using namespace Grid;
// Make the logger work like Python print()
template<typename ... Args>
template<typename... Args>
inline std::string sjoin(Args&&... args) noexcept {
std::ostringstream msg;
(msg << ... << args);
return msg.str();
}
template <typename ... Args>
template <typename... Args>
inline void Grid_log(Args&&... args) {
std::string msg = sjoin(std::forward<Args>(args)...);
std::cout << GridLogMessage << msg << std::endl;