[cfe-commits] [libcxx] r124192 - /libcxx/trunk/include/tuple
Douglas Gregor
dgregor at apple.com
Tue Jan 25 08:43:15 PST 2011
On Jan 25, 2011, at 8:31 AM, Howard Hinnant wrote:
> Author: hhinnant
> Date: Tue Jan 25 10:31:30 2011
> New Revision: 124192
>
> URL: http://llvm.org/viewvc/llvm-project?rev=124192&view=rev
> Log:
> tweak for readability (no functionality change)
>
> Modified:
> libcxx/trunk/include/tuple
>
> Modified: libcxx/trunk/include/tuple
> URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/tuple?rev=124192&r1=124191&r2=124192&view=diff
> ==============================================================================
> --- libcxx/trunk/include/tuple (original)
> +++ libcxx/trunk/include/tuple Tue Jan 25 10:31:30 2011
> @@ -589,7 +589,7 @@
> get(tuple<_Tp...>&& __t)
> {
> typedef typename tuple_element<_Ip, tuple<_Tp...> >::type type;
> - return static_cast<typename tuple_element<_Ip, tuple<_Tp...> >::type&&>(
> + return static_cast<type&&>(
> static_cast<__tuple_leaf<_Ip, type>&&>(__t.base_).get());
> }
Oh, I forgot to mention… an alternative implementation approach would be to add more __tuple_leaf::get() overloads that use ref-qualifiers to distinguish between __tuple_leaf-as-lvalue and __tuple_leaf-as-rvalue. However, Clang doesn't support ref-qualifiers yet, so I went this route.
- Doug
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110125/338d34c2/attachment.html>
More information about the cfe-commits
mailing list