Hi ldionne, EricWF, K-ballo,

In the single-argument case, `tuple_cat` of an rvalue tuple appears to move 
from, destroy, and then move from the argument again.

Provide a degenerate implementation for the single-argument case.

http://reviews.llvm.org/D8084

Files:
  include/tuple

Index: include/tuple
===================================================================
--- include/tuple
+++ include/tuple
@@ -1117,6 +1117,14 @@
                                             
_VSTD::forward<_Tuples>(__tpls)...);
 }
 
+template <class _Tuple>
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+typename __tuple_cat_return<_Tuple>::type
+tuple_cat(_Tuple&& __t0)
+{
+    return __t0;
+}
+
 template <class ..._Tp, class _Alloc>
 struct _LIBCPP_TYPE_VIS_ONLY uses_allocator<tuple<_Tp...>, _Alloc>
     : true_type {};

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
Index: include/tuple
===================================================================
--- include/tuple
+++ include/tuple
@@ -1117,6 +1117,14 @@
                                             _VSTD::forward<_Tuples>(__tpls)...);
 }
 
+template <class _Tuple>
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+typename __tuple_cat_return<_Tuple>::type
+tuple_cat(_Tuple&& __t0)
+{
+    return __t0;
+}
+
 template <class ..._Tp, class _Alloc>
 struct _LIBCPP_TYPE_VIS_ONLY uses_allocator<tuple<_Tp...>, _Alloc>
     : true_type {};
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to