[PATCH] D41458: [libc++][C++17] Elementary string conversions for integral types
Zhihao Yuan via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 10 10:41:14 PDT 2018
lichray marked an inline comment as done.
lichray added inline comments.
================
Comment at: include/charconv:89
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+enum class _LIBCPP_ENUM_VIS chars_format
----------------
lichray wrote:
> mclow.lists wrote:
> > Quuxplusone wrote:
> > > lichray wrote:
> > > > mclow.lists wrote:
> > > > > lichray wrote:
> > > > > > EricWF wrote:
> > > > > > > We need to hide these names when `_LIBCPP_STD_VER < 17`, since we're not allowed to introduce new names into namespace `std` in older dialects.
> > > > > > But this header is backported to C++11, so I intended to not to guard it.
> > > > > > But this header is backported to C++11, so I intended to not to guard it.
> > > > >
> > > > > In general, we don't provide new features for old language versions.
> > > > >
> > > > > The only time we've ever done that is for `string_view`, and I'm **still** not sure I did the right thing there.
> > > > We need to decide on this... From my point of view this header will be widely used by formatting and logging libraries, and it doesn't add much to the community by enforcing C++17 here, especially when the interface we specified are very simple and not using any features beyond C++11.
> > > This question is also relevant to my interests, in re `<memory_resource>`.
> > > From my point of view this header will be widely used by formatting and logging libraries,
> >
> > Non-portable formatting and logging libraries - if we provide it before C++17 and they use it.
> >
> When they use it, what's next?
>
> 1. Someone try to use the library against libstdc++, he/she
> - file a bug report to the library, or
> - file a bug report to libstdc++
> 2. The library has too little users, so it's okay for it to be non-portable.
>
> Looks good to me.
Back-ported to C++14, in-line with libstdc++.
Repository:
rCXX libc++
https://reviews.llvm.org/D41458
More information about the cfe-commits
mailing list