You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
AQuery/server/io.h

16 lines
414 B

3 years ago
#pragma once
#include "types.h"
#include <cstdio>
#include <string>
template <class ...Types>
std::string generate_printf_string(const char* sep = " ", const char* end = "\n") {
std::string str;
3 years ago
((str += types::printf_str[types::Types<value_type_r<Types>>::getType()], str += sep), ...);
const auto trim = str.size() - strlen(sep);
if (trim > 0)
str.resize(trim);
3 years ago
str += end;
return str;
}
3 years ago