From ae6a0c6b2f7256643da965290070007fb8d06b1f Mon Sep 17 00:00:00 2001 From: Larry Gritz Date: Thu, 26 Mar 2026 19:50:47 -0700 Subject: [PATCH] int: No longer force disabling of fmt exceptions I think forcing fmt to disable exceptions is probably doing more harm than good, probably does not work as expected for apps that use fmt elsewhere (when we first started using fmt, it was not super popular, so we weren't really concerned about how we might conflict with other libraries in the same app), and disabling exceptions makes it behave differently than std::format/print. So let's stop doing this and see what happens! (In main.) Also, declutter by removing the FMT_USE_GRISU definition, which was only meaningful for very old fmt versions that are oldest than our minimum supported version now. Signed-off-by: Larry Gritz --- src/include/OpenImageIO/detail/fmt.h | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/include/OpenImageIO/detail/fmt.h b/src/include/OpenImageIO/detail/fmt.h index 3558152ae7..111b0d5b8e 100644 --- a/src/include/OpenImageIO/detail/fmt.h +++ b/src/include/OpenImageIO/detail/fmt.h @@ -14,11 +14,6 @@ # define FMT_HEADER_ONLY #endif -// Disable fmt exceptions -#ifndef FMT_EXCEPTIONS -# define FMT_EXCEPTIONS 0 -#endif - #if OIIO_VERSION_LESS(3, 1, 2) /* DEPRECATED -- remove at next ABI compatibility boundary */ OIIO_NAMESPACE_3_1_BEGIN @@ -29,12 +24,6 @@ log_fmt_error(const char* message); OIIO_NAMESPACE_3_1_END #endif -// Use the grisu fast floating point formatting for old fmt versions -// (irrelevant for >= 7.1). -#ifndef FMT_USE_GRISU -# define FMT_USE_GRISU 1 -#endif - // fmt 8.1 stopped automatically enabling formatting of anything that supports // ostream output. This breaks a lot! Re-enable this old behavior. // NOTE: fmt 10.0 removed this support entirely.