[libcxx-commits] [PATCH] D70631: Microsoft's floating-point to_chars powered by Ryu and Ryu Printf

Afanasyev Ivan via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Mar 4 11:15:38 PST 2020


ivafanas added inline comments.


================
Comment at: libcxx/include/charconv:733
+
+    if constexpr (_IsSame<_Floating, float>::value) {
+        _Adjusted_mantissa = _Ieee_mantissa << 1; // align to hexit boundary (23 isn't divisible by 4)
----------------
As I remember `if constexpr` is available since C++17:
https://en.cppreference.com/w/cpp/language/if

And `charconv` header was made usable with C++11 in libc++:
https://reviews.llvm.org/D59598

May be it is a good idea to save header compatibility with C++11.


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

https://reviews.llvm.org/D70631





More information about the libcxx-commits mailing list