Why not fmtlib compile-time formatting? #105
-
@lukevalenty At a superficial glance, it looks like fmtlib v9.0 supports compile-time formatting for even floating-point numbers... So why not use that instead of inventing your own thing? I'm sure you've already looked and have an answer, and my understanding of fmtlib is very superficial, so my assumptions are probably completely wrong... So can you explain? |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 7 replies
-
Mostly because the string_constant library was originally written about two years ago. I would welcome a pull-request to replace the compile-time formatting with fmtlib under the hood, but retain string_constant input and output. |
Beta Was this translation helpful? Give feedback.
-
#338 switches to compile-time formatting with fmtlib. |
Beta Was this translation helpful? Give feedback.
-
We avoid loading fmtlib simply because of @elbeno , do you customize your own version of fmtlib? How do you compile fmtlib and Intel cib with |
Beta Was this translation helpful? Give feedback.
-
We don't have a custom version of fmtlib. A quick test shows that all the tests work with (The current fmtlib version is 10.2.0 - are you referring to the cpp17 branch? But then #338 isn't on that branch...) Exception handling is actually required for freestanding implementations, as is the A strictly minimal freestanding implementation would not currently support CIB anyway (likely until https://wg21.link/p2407 lands in C++26?). If there is a toolchain issue here, I think the right solution is either an appeal to the toolchain vendor or a PR to fmtlib? |
Beta Was this translation helpful? Give feedback.
-
@lukevalenty FYI |
Beta Was this translation helpful? Give feedback.
#338 switches to compile-time formatting with fmtlib.