[PATCH] D54472: Disable invalid isPodLike<> specialization

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 15 09:51:53 PST 2018


dblaikie added inline comments.


================
Comment at: include/llvm/Support/type_traits.h:40-44
+#define LLVM_VERIFY_ISPODLIKE_CONSISTENCY(T)                                   \
+  static_assert(llvm::isPodLike<T>::value ==                                   \
+                    std::is_trivially_copyable<T>::value,                      \
+                "pod-like implies trivially copyable")
+
----------------
Does the presence of this macro mean "no one should ever specialize isPodLike"? & if they don't, then its certain that isPodLike == is_trivially_copyable, by definition?

If so, then I'm not sure of the importance of the macro - we should just say "don't specialize isPodLike, ever & leave it at that, maybe?


Repository:
  rL LLVM

https://reviews.llvm.org/D54472





More information about the llvm-commits mailing list