Comments (3)
I was able to patch it with this horrible code. If for some reason you like it, I can make a pull request.
diff --git a/format.cc b/format.cc
index f57c0db..8e8cd42 100644
--- a/format.cc
+++ b/format.cc
@@ -440,8 +440,12 @@ class fmt::internal::ArgFormatter :
default:
internal::ReportUnknownType(spec_.type_, "char");
}
- }
- if (spec_.align_ == ALIGN_NUMERIC || spec_.flags_ != 0)
+ }
+ else {
+ if(spec_.align_ == ALIGN_NUMERIC)
+ throw FormatError("invalid format specifier for char");
+ }
+ if (spec_.flags_ != 0)
throw FormatError("invalid format specifier for char");
typedef typename fmt::BasicWriter<Char>::CharPtr CharPtr;
CharPtr out = CharPtr();
from fmt.
Fixed, sorry for the inconvenience (I forgot to test the previous fix and of course it was not working as expected).
from fmt.
Thanks again!
from fmt.
Related Issues (20)
- std::chrono::current_zone() is not meant to return the local time zone HOT 4
- It would be good to have a customizable separator in fmt::group_digits(...) HOT 1
- fmt::styled and fmt::formatter<std::string> parse deactivate colors/termaps HOT 1
- formatting of variant types HOT 3
- FMT_USE_NONTYPE_TEMPLATE_ARGS detection is wrong on trunk HOT 2
- Support for a single `char` separator in `fmt::join()` HOT 1
- Formatting for strings with custom allocators fails to compile HOT 2
- Advice for extending libfmt for GPU support? HOT 2
- xchar.h extra dependencies HOT 1
- cannot use in CUDA (+MSVC) for newest branch master HOT 1
- Question: what's the difference between string-like formatters and where are they defined? HOT 2
- fmt won't let me specialize a formatter to format mixed character types. HOT 2
- `fmt::isnan` triggers floating-point exception for NaN values HOT 4
- Header-only mode not linking with fmt::ostream HOT 1
- g++-14 compilation error using named arguments inside a generic lambda HOT 2
- Add support for grouping numbers and '_', ',' separators HOT 1
- How do you forward fmt::format_string without explicitly indicating it in the interface? HOT 1
- Fail to build on Ubuntu-18.04 with g++-13.2 HOT 8
- format_as support in fmt/core.h HOT 1
- format_as but with iterator HOT 1
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.