[PATCH] D57018: Fix lvm::is_trivially_copyable portability issues

Fedor Sergeev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 21 13:29:58 PST 2019


fedor.sergeev added inline comments.


================
Comment at: include/llvm/Support/type_traits.h:125
+  template<class F>
+  static std::true_type apply(decltype(std::declval<F>()=std::declval<F>())*);
+  static std::false_type apply(...);
----------------
Somehow this declval<F> thing does not look right. Doesnt it have F&& type?
Besides, the result of assignment might as well be a reference, which will reject forming a pointer on its decltype.



Repository:
  rL LLVM

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

https://reviews.llvm.org/D57018





More information about the llvm-commits mailing list