[libcxx-commits] [PATCH] D115100: [libc++] Enable the optimized _IsSame on GCC as well as Clang.

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Dec 15 14:33:27 PST 2021


ldionne accepted this revision.
ldionne added a comment.
This revision is now accepted and ready to land.

LGTM with comments.



================
Comment at: libcxx/include/type_traits:564-565
+// _IsSame<A,B> and _IsSame<C,D> are the same type (namely, false_type).
+// If we ever need to support a compiler without the __is_same builtin,
+// we can make this an alias template for `is_same<T,U>::type`.
 
----------------
I would remove that part of the comment -- I don't see what it adds.

Also, I would document that this `_IsSame` can't be used anywhere that affects mangling in order to save some cycles if someone encounters the same issue in the future.


================
Comment at: libcxx/include/type_traits:582-584
+// helper class
 
+struct __two {char __lx[2];};
----------------
I'm going to be really nitpicky and ask that you make this change in a separate NFC commit, no review needed. Just to keep reviews clean.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D115100/new/

https://reviews.llvm.org/D115100



More information about the libcxx-commits mailing list