[libcxx-commits] [PATCH] D100134: [libc++] Fix std::type_info comparison

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Apr 8 13:11:06 PDT 2021


ldionne created this revision.
Herald added a subscriber: smeenai.
ldionne requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.

As noted by Richard Smith in https://reviews.llvm.org/D97802#2675067, the
current implementation of std::type_info less-than comparison was not an
ordering relation. This commit fixes that.

It's technically a behavior change, however anyone relying on the ordering
as given by the previous implementation was relying on something extremely
brittle, so I think it's safe to fix this.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D100134

Files:
  libcxx/include/typeinfo
  libcxx/test/std/language.support/support.rtti/type.info/type_info.order.sh.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D100134.336202.patch
Type: text/x-patch
Size: 4164 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210408/adc56e37/attachment.bin>


More information about the libcxx-commits mailing list