[libcxx-commits] [libcxx] [libc++][format] Don't instantiate direct `__(u)int128_t` visitation (PR #139662)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Thu Jun 12 10:09:23 PDT 2025


================
@@ -22,12 +22,35 @@
 #include <cassert>
 #include <format>
 #include <type_traits>
+#include <variant>
 
 #include "constexpr_char_traits.h"
 #include "make_string.h"
 #include "min_allocator.h"
 #include "test_macros.h"
 
+template <class Context>
+struct limited_visitor {
+  using CharT = Context::char_type;
+
+  void operator()(std::monostate) const {}
----------------
ldionne wrote:

Do you think it makes sense to regroup these types into a typelist of some kind and reuse them? That could prevent them from going out of sync in case the specification for `<format>` changes in the future.

https://github.com/llvm/llvm-project/pull/139662


More information about the libcxx-commits mailing list