[libcxx-commits] [PATCH] D121530: [libc++][format] Implement format-string.

Victor Zverovich via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sat Jun 4 11:38:20 PDT 2022


vitaut added inline comments.


================
Comment at: libcxx/include/format:569-573
+#    ifdef _WIN32
+          __basic_format_string<char, type_identity_t<_Args>...> __fmt,
+#    else
+          __format_string<_Args...> __fmt,
+#    endif
----------------
Mordante wrote:
> vitaut wrote:
> > Can we avoid these ugly ifdefs? Why not rename `__format_string` to `__format_string_t` or similar?
> I originally added them due to odd errors on Windows. Later I figured out it wasn't a bug of the Windows compilers but that `__format_string` is a SAL macro on Windows. (Not the first time I've been bitten by SAL macros.)
> 
> For now I prefer to keep them since I expect these become `format_string` during the plenary in July.
Up to you but if you rename it to something other than `__format_string` now it will be a small change to switch to `format_string` as well.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D121530/new/

https://reviews.llvm.org/D121530



More information about the libcxx-commits mailing list