[libc++][nfc] remove duplicated __to_unsigned.
authorMark de Wever <koraq@xs4all.nl>
Wed, 12 May 2021 15:46:24 +0000 (17:46 +0200)
committerMark de Wever <koraq@xs4all.nl>
Wed, 12 May 2021 19:09:49 +0000 (21:09 +0200)
commitc273f5ef7d3f5ac05f67ec899e25830cd9543e56
treed3b2cbe3d12325ef84c232359103d03ffbb309f8
parenta8f7dee1dffbf8c18acbcc7b1f6d659bf808798e
[libc++][nfc] remove duplicated __to_unsigned.

Both `<type_traits>` and `<charconv>` implemented this function with
different names and a slightly different behavior. This removes the
version in `<charconv>` and improves the version in `<typetraits>`.

- The code can be used again in C++11.
-  The original claimed C++14 support, but `[[nodiscard]]` is not
   available in  C++14.
- Adds `_LIBCPP_INLINE_VISIBILITY`.

Reviewed By: zoecarver, #libc, Quuxplusone

Differential Revision: https://reviews.llvm.org/D102332
libcxx/include/__ranges/size.h
libcxx/include/charconv
libcxx/include/type_traits