1 #ifndef MSP_IO_PRINT_H_
2 #define MSP_IO_PRINT_H_
4 #include <msp/strings/format.h>
12 Writes a string to an I/O object. Same as o.write(f). Provided for
13 completeness with the other print functions.
15 inline unsigned print(Base &o, const std::string &f)
16 { return o.write(f); }
18 template<typename... Args>
19 inline unsigned print(Base &o, const std::string &f, Args... args)
20 { return print(o, format(f, args...)); }
22 /* The following functions print to console */
24 inline unsigned print(const std::string &f)
25 { return print(cout, f); }
27 template<typename... Args>
28 inline unsigned print(const std::string &f, Args... args)
29 { return print(cout, f, args...); }