hans marked 2 inline comments as done.
hans added inline comments.

================
Comment at: test/CodeGenCXX/microsoft-cannot-mangle-float128.cpp:3-11
+template <bool> struct B;
+template <class T> constexpr bool is_floating_point_v = false;
+
+struct StrictNumeric {
+  StrictNumeric(int);
+  template <typename Dst, B<is_floating_point_v<Dst>> = nullptr> operator 
Dst();
+};
----------------
rsmith wrote:
> This seems like a fragile way of checking for the bug; I'd prefer a test that 
> tests `Sema` rather than code generation. For instance, how about a class 
> with a conversion operator that converts to `T` with an `enable_if` disabling 
> it for `float`, `double`, and `long double`, and a check that an instance of 
> such a class can't be used in floating-point arithmetic?
Thanks! That sounds like a good plan.


https://reviews.llvm.org/D39579



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D39579: B... Hans Wennborg via Phabricator via cfe-commits

Reply via email to