[libcxx-commits] [PATCH] D44865: [libc++] Implement P0608R3 - A sane variant converting constructor
Zhihao Yuan via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Jun 9 21:30:42 PDT 2019
lichray marked an inline comment as done.
lichray added a comment.
In D44865#1535823 <https://reviews.llvm.org/D44865#1535823>, @zoecarver wrote:
> - the spacing is different from the rest of libc++ (a lot of it was that way before).
That's not something I can "fix" in this patch :(
> - since this is a paper it should probably be guarded with `#if _LIBCPP_STD_VER > 17`
Marshall and me agreed that we are going to apply the paper as a "bugfix." We don't want to make the constructor behave differently under different language versions.
> - update the status in `www`.
Done.
================
Comment at: include/variant:1110
+template <class _Base, class _Tp>
+struct __overload_bool : _Base {
+ using _Base::operator();
----------------
zoecarver wrote:
> Is this structure 100% necessary? Couldn't `__overload` add an overload to take care of `bool`s? Maybe something like this:
>
> ```
> template<class _Up>
> auto operator()(_Tp, _Up&&) const
> -> enable_if_t<
> is_same_v<__uncvref_t<_Up>, bool>,
> __identity<_Tp>
> >;
> ```
I'm trying to reduce the compile time cost of SFINAE by putting the bool handling logic in specializations.
Repository:
rCXX libc++
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D44865/new/
https://reviews.llvm.org/D44865
More information about the libcxx-commits
mailing list