-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Small issues in docs #1
Comments
Thank you for looking at my library and for your comments. The documentation was a bit ahead of implementation.
I plan to add support for user-provided formatting functions which could be more I corrected a section about printf mentioning the POSIX extension that adds Thanks, |
Right, I couldn't help thinking more about the reordering problem and came to The idea of wrapping your buffer_ up in a std::streambuf and using that |
Signed-off-by: Daniela Engert <[email protected]>
Take #1 of n Signed-off-by: Daniela Engert <[email protected]>
Signed-off-by: Daniela Engert <[email protected]>
Signed-off-by: Daniela Engert <[email protected]>
Take #1 of n Signed-off-by: Daniela Engert <[email protected]>
Signed-off-by: Daniela Engert <[email protected]>
Take #1 of n Signed-off-by: Daniela Engert <[email protected]>
Signed-off-by: Daniela Engert <[email protected]>
Take #1 of n Signed-off-by: Daniela Engert <[email protected]>
MSVS IDE speed-test target to run tests
arch: add build files
parch for Lsposed
Hi, interesting to set yet another take on this problem :)
I had a look at the docs out of curiosity and have a few comments (maybe I am
just expecting too much, since this library seems to be only a few hours old!)
Support for user-defined types
I wanted to see how you achieved this, but I can't see that it works as
expected. For instance, the following is a compile error:
I thought about implementing positional arguments in tinyformat, and the best
solution I came up with involved a type of variant class as follows:
You'd then construct a std::vector<Arg*> as you sweep through the arguments,
creating an ArgT for the Nth argument. (The could be stack-allocated
in the tinyformat case, though unfortunately not with the << based interface.)
Reordering can then be achived simply using indexing.
In the end I didn't do it because I didn't need the functionality and it would
introduce some extra complexity to tinyformat, which is alreay a lot less tiny
than I would like ;-) It also means a virtual function call per argument which
is less than ideal...
i18n in printf
posix printf does have a notation to support positional arguments for i18n,
and this is implemented in glibc even though it's not in C99. For example,
try out:
Good luck with your implementation!
~Chris
The text was updated successfully, but these errors were encountered: