[PATCH] [libcxx] Delay evaluation of __make_tuple_types to prevent blowing the max template instantiation depth. Fixes Bug #18345

Agustín Bergé kaballo86 at hotmail.com
Wed Oct 22 15:20:37 PDT 2014


Looks good to me. Some notes attached.

================
Comment at: include/__tuple:222
@@ -221,3 +221,3 @@
 
-template <bool, class _Tp, class _Up>
+template <class _Tp, class _Up>
 struct __tuple_convertible_imp : public false_type {};
----------------
No need to name these parameters

================
Comment at: include/__tuple:235
@@ -234,1 +234,3 @@
 
+template <bool, class _Tp, class _Up>
+struct __tuple_convertible_apply : public false_type {};
----------------
..or these

================
Comment at: include/__tuple:259
@@ -248,3 +258,3 @@
 
-template <bool, class _Tp, class _Up>
+template <class _Tp, class _Up>
 struct __tuple_constructible_imp : public false_type {};
----------------
..or these

================
Comment at: include/__tuple:272
@@ -261,1 +271,3 @@
 
+template <bool _SameSize, class _Tp, class _Up>
+struct __tuple_constructible_apply : public false_type {};
----------------
..or these

================
Comment at: include/__tuple:296
@@ -275,3 +295,3 @@
 
-template <bool, class _Tp, class _Up>
+template <class _Tp, class _Up>
 struct __tuple_assignable_imp : public false_type {};
----------------
..or these

================
Comment at: include/__tuple:309
@@ -288,1 +308,3 @@
 
+template <bool _SameSize, class _Tp, class _Up>
+struct __tuple_assignable_apply : public false_type {};
----------------
..or these

================
Comment at: test/utilities/tuple/tuple.tuple/tuple.assign/tuple_array_template_depth.pass.cpp:18
@@ +17,3 @@
+// This test checks that we do not evaluate __make_tuple_types
+// on the array.
+
----------------
This comment is true only for mismatched tuple-sizes

http://reviews.llvm.org/D4467






More information about the cfe-commits mailing list