[libcxx-commits] [PATCH] D93593: [libc++][format] Add __format_arg_store.

Christopher Di Bella via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sun Feb 21 00:14:13 PST 2021


cjdb added inline comments.


================
Comment at: libcxx/include/format:408-418
+  template <class _Tp>
+  _LIBCPP_INLINE_VISIBILITY explicit basic_format_arg(
+      const _Tp& __value) noexcept
+      requires(_VSTD::is_same_v<_Tp, bool> || _VSTD::is_same_v<_Tp, char_type>
+#ifndef _LIBCPP_HAS_NO_INT128
+               || _VSTD::is_same_v<_Tp, __int128_t> ||
+               _VSTD::is_same_v<_Tp, __uint128_t>
----------------
miscco wrote:
> I think we whould really constraint this on `template<integral _Tp>` and handle all integral types here. Having them as multiple separat functions has significant maintainance overhead. Same for `<template<floating_point _Tp>`
> 
> I think they are in flight by @cjdb so maybe wait a bit to get this in.
> 
> (FYI this i how it I dit it for MSVC STL https://github.com/microsoft/STL/blob/99e8a2d7f2a083a6f768cff35a5e1792feb625a6/stl/inc/format#L933-L962 )
`same_as`, `integral`, and `floating_point` are all merged :-)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D93593



More information about the libcxx-commits mailing list