format: accept forwarding references for printf/python
This commit is contained in:
parent
c7fe53f430
commit
4b69b7515b
@ -203,7 +203,7 @@ namespace util::format {
|
|||||||
/// parses a printf format string and binds parameters for rendering.
|
/// parses a printf format string and binds parameters for rendering.
|
||||||
template <typename ...Args>
|
template <typename ...Args>
|
||||||
auto
|
auto
|
||||||
printf (util::view<const char*> fmt, const Args &...args)
|
printf (util::view<const char*> fmt, Args &&...args)
|
||||||
{
|
{
|
||||||
return printf (fmt) (args...);
|
return printf (fmt) (args...);
|
||||||
}
|
}
|
||||||
@ -212,7 +212,7 @@ namespace util::format {
|
|||||||
/// parses a python format string and binds parameters for rendering.
|
/// parses a python format string and binds parameters for rendering.
|
||||||
template <typename ...Args>
|
template <typename ...Args>
|
||||||
auto
|
auto
|
||||||
python (util::view<const char*> fmt, const Args &...args)
|
python (util::view<const char*> fmt, Args &&...args)
|
||||||
{
|
{
|
||||||
return python (fmt) (args...);
|
return python (fmt) (args...);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user