Comments (2)
Thanks for the suggestion. It is an interesting idea to use named vs unnamed arguments in such way but I don't think it's worth relaxing the checks for this. A potentially better approach would be formatting arguments from different sources separately.
from fmt.
A potentially better approach would be formatting arguments from different sources separately.
I don't understand how this would be done or how it would help with the use case. You cannot call fmt multiple times to process format string incrementally, consuming just some args at the time. That causes a format error. The only possible workaround I see is to write a custom parser to preprocess the string - e.g. first find and replace the {m}
, then delegate to fmt. This unfortunately means that the compile-time checking cannot be used.
So there doesn't seem to be any good solution for the use case without direct support in fmt itself.
from fmt.
Related Issues (20)
- question about missing basic_format_args constructor in v11 HOT 1
- Formatting with `std::string` fail to compile with `consteval` HOT 4
- inline namespace has previous version in 11.0.0 HOT 2
- can't print volatile void* HOT 5
- You can (not) control the Unicode support via the CMake `FMT_UNICODE` option. HOT 3
- Building a GTK app with 11.0.1 HOT 10
- trunk doesn't work with `std::generator` HOT 1
- v11.0+ fails to build on Amiga and Xbox HOT 10
- #include <fmt/ranges.h> breaks formatting Eigen types HOT 3
- Integration with magic_enum library considering FMT_COMPILE and iterator type HOT 1
- Warning from flockfile HOT 2
- a strange problem HOT 1
- ubuntu 24.04 with g++-14 failes with internal compiler error HOT 5
- 11.0.1 MSVC 2015 Build error HOT 2
- Undefined symbol error when using fmt::windows_error in header-only mode HOT 4
- Potential performance regression of vformat_to in libfmt 11 compared to libfmt 10.2.1 HOT 4
- Simple Execution g++ -g fmt.cpp -I "fmt\include" -o fmt.exe HOT 3
- https://fmt.dev/latest/api.html in error message is a 404
- Formatting `year_month_day` does not work on clang 18.1.0 or earlier, on GCC 13.3 and earlier
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fmt.