[libcxx-commits] [PATCH] D144331: [libc++][format] Implements formatter thread::id.
Mark de Wever via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Feb 21 08:25:59 PST 2023
Mordante added inline comments.
================
Comment at: libcxx/include/thread:256
+ using _Tp = decltype(__get_underlying_id(__id));
+ using _Cp = conditional_t<integral<_Tp>, _Tp, conditional_t<is_pointer_v<_Tp>, uintptr_t, void>>;
+ static_assert(!is_same_v<_Cp, void>, "unsupported thread::id type, please file a bug report");
----------------
Note before I used a larger `if constexpr`. but that failed. In the not taken branches the `reinterpret_cast` caused compilation errors.
================
Comment at: libcxx/include/thread:259
+
+ static_assert(std::is_same_v<_Tp, __libcpp_thread_id>);
+ __format_spec::__parsed_specifications<_CharT> __specs = __parser_.__get_parsed_std_specifications(__ctx);
----------------
TODO remove.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144331/new/
https://reviews.llvm.org/D144331
More information about the libcxx-commits
mailing list