search for: per_elts_fmt

Displaying 2 results from an estimated 2 matches for "per_elts_fmt".

2016 Oct 12
3
RFC: General purpose type-safe formatting library
I thought I did. :) Passing format strings between functions is very useful. For example, imagine wanting to write a function like printRange(const char *Fmt, std::vector<int> Items); This isn't possible if your format string MUST be a string literal and is very useful. Equally importantly, I don't see a good reason to disallow runtime format strings. On Wed, Oct 12, 2016 at
2016 Oct 12
5
RFC: General purpose type-safe formatting library
...ample, imagine wanting to write a function like > printRange(const char *Fmt, std::vector<int> Items); > > > I’m not sure I understand your example? > Do you mean you want the range to be in the format? If so Why? I would > rather write something like: > > printRange(“{per_elts_fmt}”, /* separator */ “, ", begin, end); > > This isn't possible if your format string MUST be a string literal > > > I haven’t seen a convincing example yet to support this. I may miss the > obvious, but you haven’t shown it either. > One could find a way to *compose* fo...