[PATCH] [libc++] Try and prevent evaluation of `is_default_constructible` on tuples default constructor if it is not needed.

Eric Fiselier eric at efcs.ca
Fri Feb 20 18:31:50 PST 2015


Accepting. I think this is a candidate for post commit review.


================
Comment at: include/type_traits:2649-2652
@@ -2648,1 +2648,6 @@
 
+template <class _Tp, bool>
+struct _LIBCPP_TYPE_VIS_ONLY __dependent_is_default_constructible
+    : public is_default_constructible<_Tp>
+    {};
+
----------------
rsmith wrote:
> Is it worth generalizing / simpilfying this:
> 
>     template <class _Tp, bool> struct __dependent : public _Tp {};
> 
> (Usage: `__dependent<is_default_constructible<_Tp>, Dummy>::value`)
Probably.

http://reviews.llvm.org/D7569

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the cfe-commits mailing list