inline unsigned print(Base &o, const std::string &f)
{ return o.write(f); }
-#if __cplusplus>=201103L
template<typename... Args>
inline unsigned print(Base &o, const std::string &f, Args... args)
{ return print(o, format(f, args...)); }
-#else
-template<typename A1>
-inline unsigned print(Base &o, const std::string &f, A1 a1)
-{ return print(o, format(f, a1)); }
-
-template<typename A1, typename A2>
-inline unsigned print(Base &o, const std::string &f, A1 a1, A2 a2)
-{ return print(o, format(f, a1, a2)); }
-
-template<typename A1, typename A2, typename A3>
-inline unsigned print(Base &o, const std::string &f, A1 a1, A2 a2, A3 a3)
-{ return print(o, format(f, a1, a2, a3)); }
-
-template<typename A1, typename A2, typename A3, typename A4>
-inline unsigned print(Base &o, const std::string &f, A1 a1, A2 a2, A3 a3, A4 a4)
-{ return print(o, format(f, a1, a2, a3, a4)); }
-
-template<typename A1, typename A2, typename A3, typename A4, typename A5>
-inline unsigned print(Base &o, const std::string &f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5)
-{ return print(o, format(f, a1, a2, a3, a4, a5)); }
-#endif
-
/* The following functions print to console */
inline unsigned print(const std::string &f)
{ return print(cout, f); }
-#if __cplusplus>=201103L
template<typename... Args>
inline unsigned print(const std::string &f, Args... args)
{ return print(cout, f, args...); }
-#else
-template<typename A1>
-inline unsigned print(const std::string &f, A1 a1)
-{ return print(cout, f, a1); }
-
-template<typename A1, typename A2>
-inline unsigned print(const std::string &f, A1 a1, A2 a2)
-{ return print(cout, f, a1, a2); }
-
-template<typename A1, typename A2, typename A3>
-inline unsigned print(const std::string &f, A1 a1, A2 a2, A3 a3)
-{ return print(cout, f, a1, a2, a3); }
-
-template<typename A1, typename A2, typename A3, typename A4>
-inline unsigned print(const std::string &f, A1 a1, A2 a2, A3 a3, A4 a4)
-{ return print(cout, f, a1, a2, a3, a4); }
-
-template<typename A1, typename A2, typename A3, typename A4, typename A5>
-inline unsigned print(const std::string &f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5)
-{ return print(cout, f, a1, a2, a3, a4, a5); }
-#endif
-
} // namespace IO
} // namespace Msp
return *this;
}
-#if __cplusplus>=201103L
template<typename T, typename... Tail>
Formatter &operator()(const T &a, const Tail &... tail)
{
return (*this)(a)(tail...);
}
-#endif
/** Returns the result of the formatting operation. Will throw if not
enough values have been fed to the formatter. */
inline Formatter format(const std::string &f)
{ return Formatter(f); }
-#if __cplusplus >= 201103L
template<typename... Args>
inline std::string format(const std::string &f, const Args &... args)
{
return Formatter(f)(args...).str();
}
-#else
-template<typename A1>
-inline std::string format(const std::string &f, const A1 &a1)
-{ return Formatter(f)(a1).str(); }
-
-template<typename A1, typename A2>
-inline std::string format(const std::string &f, const A1 &a1, const A2 &a2)
-{ return Formatter(f)(a1)(a2).str(); }
-
-template<typename A1, typename A2, typename A3>
-inline std::string format(const std::string &f, const A1 &a1, const A2 &a2, const A3 &a3)
-{ return Formatter(f)(a1)(a2)(a3).str(); }
-
-template<typename A1, typename A2, typename A3, typename A4>
-inline std::string format(const std::string &f, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4)
-{ return Formatter(f)(a1)(a2)(a3)(a4).str(); }
-
-template<typename A1, typename A2, typename A3, typename A4, typename A5>
-inline std::string format(const std::string &f, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5)
-{ return Formatter(f)(a1)(a2)(a3)(a4)(a5).str(); }
-#endif
-
} // namespace Msp
#endif