This patch reverts the incorporation of `__lazy_enable_if`, as this is a more 
general solution. It implements `__numeric_type` in a SFINAE-friendly fashion, 
which will flag ambiguously convertible UDTs (as well as other soft errors) as 
non-numeric types.

================
Comment at: include/type_traits:1180
@@ -1182,2 +1179,3 @@
 
-template <class _Tp>
+float __numeric_test(float);
+double __numeric_test(char);
----------------
mclow.lists wrote:
> Is there a reason that these functions are no longer static members?
> 
They are needed for the well-formed specialization of `__numeric_type`.

================
Comment at: include/type_traits:1246
@@ -1243,3 +1245,3 @@
 template <class _A1>
-class __promote_imp<_A1, void, void, true>
+struct __promote_imp<_A1, void, void, true>
 {
----------------
This change to `struct` was not intended. Will revert to `class`.

http://reviews.llvm.org/D5942



_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to