Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Minor change to prevent gcc -Weffc++ warnings. #4

wants to merge 1 commit into from

2 participants


Hi c42f,

I like your tool, thanks for that!
I did not know that there is such a small implementation to use std::string with the s/printf syntax, which I prefer over std::stringstream.

We use in our project -Weffc++ and usually build warnings free. I thought instead of branching here permanently, I send you the two lines to prevent the warnings as pull request, perhaps you want to apply it.



Thanks for the suggestion, I'm happy to help people avoid warnings if the changes are small. I have merged the patch with some modifications to the placement of the declarations so that they appear lower down in the class (away from the public bits). Cheers!

@c42f c42f closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 15, 2013
  1. @uliklank
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 0 deletions.
  1. +3 −0  tinyformat.h
3  tinyformat.h
@@ -294,6 +294,9 @@ namespace detail {
// which arguments are formatted.
class FormatIterator
+ // FormatIterator contains a pointer so set the copy constructor private (prevent warning with gcc and -Weffc++)
+ FormatIterator(const FormatIterator&);
+ FormatIterator& operator=(const FormatIterator&);
// Flags for features not representable with standard stream state
enum ExtraFormatFlags
Something went wrong with that request. Please try again.