add some std::string convenience overloads
git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@443 7ec92016-0320-0410-acc4-a06ded1c099a
This commit is contained in:
parent
4d99cdb205
commit
513b1eab3f
1 changed files with 17 additions and 0 deletions
|
@ -521,19 +521,36 @@ namespace Loki
|
|||
return PrintfState<std::FILE*, char>(stdout, format);
|
||||
}
|
||||
|
||||
PrintfState<std::FILE*, char> Printf(const std::string format) {
|
||||
return PrintfState<std::FILE*, char>(stdout, format.c_str());
|
||||
}
|
||||
|
||||
PrintfState<std::FILE*, char> FPrintf(FILE* f, const char* format) {
|
||||
return PrintfState<std::FILE*, char>(f, format);
|
||||
}
|
||||
|
||||
PrintfState<std::FILE*, char> FPrintf(FILE* f, const std::string& format) {
|
||||
return PrintfState<std::FILE*, char>(f, format.c_str());
|
||||
}
|
||||
|
||||
PrintfState<std::string&, char> SPrintf(std::string& s, const char* format) {
|
||||
return PrintfState<std::string&, char>(s, format);
|
||||
}
|
||||
|
||||
PrintfState<std::string&, char> SPrintf(std::string& s, const std::string& format) {
|
||||
return PrintfState<std::string&, char>(s, format.c_str());
|
||||
}
|
||||
|
||||
template <class T, class Char>
|
||||
PrintfState<T&, Char> XPrintf(T& device, const Char* format) {
|
||||
return PrintfState<T&, Char>(device, format);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
PrintfState<T&, char> XPrintf(T& device, const std::string& format) {
|
||||
return PrintfState<T&, char>(device, format.c_str());
|
||||
}
|
||||
|
||||
template <class Char, std::size_t N>
|
||||
PrintfState<std::pair<Char*, std::size_t>, Char>
|
||||
BufPrintf(Char (&buf)[N], const Char* format) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue