-
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
fmt() macro in format_to #783
Comments
It is planned, I just need to figure out how to do it in a clean way without proliferation of overloads. |
<3. But let me tell you, there is worst from a microsoft library: // The 'U' macro can be used to create a string or character literal of the platform type, i.e. utility::char_t.
// If you are using a library causing conflicts with 'U' macro, it can be turned off by defining the macro
// '_TURN_OFF_PLATFORM_STRING' before including the C++ REST SDK header files, and e.g. use '_XPLATSTR' instead.
#define U(x) _XPLATSTR(x) use an internal token like underscore or something so people can name a variable fmt, or a member ! |
@Milerius, you can easily disable the |
@vitaut Thank's ! |
Fixed in ffe414c. Now your example produces an expected compile-time error:
Also refactored the code so that it's possible to handle both compile-time and dynamically checked format strings in one function template. |
The
fmt()
macro is very useful to check if arguments are valid. As far as I can see, this is only possible forformat
. E.g. (from the documentation):I would like to be able to use the macro also in
format_to
, in order to avoid allocations fromstd::string
. For exampleIs this planned, or do I miss something?
Thank you for your support and the great work on fmtlib!
The text was updated successfully, but these errors were encountered: