add print_no_space function for use in first round
This commit is contained in:
parent
33bcd2f073
commit
19ddcef24e
|
@ -72,6 +72,11 @@ signed main() {
|
|||
print(tuple{unordered_map<int, string>{{3,"three"},{1,"one"}}});
|
||||
print(unordered_set<int>{3,1,4});
|
||||
|
||||
print_no_space("Case #", 0, ": ");
|
||||
print_no_space(42);
|
||||
print_no_space();
|
||||
print();
|
||||
|
||||
redirect_input("example.in");
|
||||
print("reading from example.in:", read_string());
|
||||
redirect_input("example.in");
|
||||
|
|
|
@ -97,4 +97,10 @@ void print() {
|
|||
std::cout << '\n';
|
||||
}
|
||||
|
||||
template <typename... Args>
|
||||
void print_no_space(Args&&... args) {
|
||||
using expander = bool[];
|
||||
(void)expander{0, (soi::io::print(std::cout, std::forward<Args>(args)), false)...};
|
||||
}
|
||||
|
||||
#endif // SOI_HEADER_IO
|
||||
|
|
Loading…
Reference in New Issue