Skip to content

Commit

Permalink
Make strprintf::fmt handle std::string* correctly
Browse files Browse the repository at this point in the history
See #41.

I also recall discussing this with noctux back in August, but I don't
know why neither of us took any action back then. Serves me as
a reminder to file issues at the first sign of trouble.
  • Loading branch information
Minoru committed Oct 29, 2017
1 parent 2cdd33c commit 7a93931
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions include/strprintf.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ class strprintf {
return fmt(format, argument.c_str(), args...);
}

template<typename... Args>
static std::string fmt(
const std::string& format, const std::string* argument, Args... args)
{
return fmt(format, *argument, args...);
}

template<typename T, typename... Args>
static std::string fmt(
const std::string& format, const T& argument, Args... args)
Expand Down

0 comments on commit 7a93931

Please sign in to comment.