yaxunl marked 2 inline comments as done. yaxunl added inline comments.
================ Comment at: clang/lib/Headers/__clang_hip_cmath.h:341 - typedef decltype(__test(std::declval<_Tp>())) type; - static const bool value = !std::is_same<type, void>::value; + typedef decltype(__test(_Tp{})) type; + static const bool value = !is_same<type, void>::value; ---------------- tra wrote: > tra wrote: > > @jlebar : Should we expect any observable surprises here? > `_Tp{}` may break if `_Tp` does not have a default constructor. At least it > does so with C++20, while the old code did not: > https://godbolt.org/z/PGEff5Mvv Right. It occurred to me that users may overload these math functions with arguments without default ctor, then we will hit the issue. I will fix this. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100794/new/ https://reviews.llvm.org/D100794 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits