Menu

#61 Using an array as source for elements

open
nobody
None
5
2010-04-06
2010-04-06
Zara
No

I think it may be useful to have fmt overloads such as
template <typename S, typename F, typename A> S& fastformat::fmt (S &sink, F const & format, size_t numElems, A const * elems );

The format parameters {0},{1}...{i} would be replaced by elements 0,1..i of the array. Probably, trying to access non-existing elements should result in an exception, but I am really flexible on that.
Does it seem useful? Is it feasible?
I offer myself to help on debugging, testing, or whichever task may seem fit.
Thank's!

Discussion

  • Zara

    Zara - 2010-04-06
    • summary: Using an array as spurce for elements --> Using an array as source for elements
     
  • Sam

    Sam - 2012-02-02

    Rough code which would support this usage as well as a generalized iterator usage fmt_iter( target, fmt, begin, end ) is attached to this forum post -- http://sourceforge.net/projects/fastformat/forums/forum/612782/topic/3799803?message=8557998

    This code worked as of 0.4. Can it be considered for 1.0?

     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.