[libcxx-commits] [PATCH] D130853: [libc++] Remove `operator!=` from `type_info` in C++20
Mark de Wever via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Aug 4 09:15:13 PDT 2022
Mordante accepted this revision.
Mordante added a comment.
This revision is now accepted and ready to land.
LGTM modulo one small nit.
================
Comment at: libcxx/docs/Status/SpaceshipProjects.csv:15
| `[alg.three.way] <https://wg21.link/alg.three.way>`_,| `lexicographical_compare_three_way <https://reviews.llvm.org/D80902>`_,[comparisons.three.way],Christopher Di Bella,|In Progress|
+| `[type.info] <https://wg21.link/type.info>`_,| `typeinfo <https://reviews.llvm.org/D130853#inline-1261074>`_,None,Adrian Vogelsgesang,|Complete|
| `[coroutine.handle.compare] <https://wg21.link/coroutine.handle.compare>`_,| `coroutine_handle <https://reviews.llvm.org/D109433>`_,[comparisons.three.way],Chuanqi Xu,|Complete|
----------------
================
Comment at: libcxx/include/typeinfo:342
_LIBCPP_INLINE_VISIBILITY
bool operator!=(const type_info& __arg) const _NOEXCEPT
----------------
avogelsgesang wrote:
> Mordante wrote:
> > This one should be updated too.
> Thanks for catching this! Somehow I assumed there would be only one typeinfo implementation and stopped my search too early...
>
> Is having multiple implementations of the same class a common pattern in libcxx? I know there is a similar pattern for `exception_ptr`. Anything else which is similar (so I am aware of it while updating other classes)?
It's very uncommon. Some classes are very closely tied to the platform they execute on. Most of the platform dependent headers are in the `__support` directory. You just managed to start with a special case for `operator!=` ;-)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130853/new/
https://reviews.llvm.org/D130853
More information about the libcxx-commits
mailing list