[PATCH] D14839: [libcxx] LWG2485: get() should be overloaded for const tuple&&

Eric Fiselier via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 14 19:48:53 PST 2015


EricWF added a comment.

In http://reviews.llvm.org/D14839#307171, @K-ballo wrote:

> In http://reviews.llvm.org/D14839#306306, @EricWF wrote:
>
> >   int x = 42;
> >   int const y = 43;
> >   std::pair<int&, int const&> const p(x, y);
> >   static_assert(std::is_same<int const&, decltype(std::get<0>(std::move(p)))>::value, "");
> >   static_assert(std::is_same<int const&, decltype(std::get<1>(std::move(p)))>::value, "");
> >   
> >
> > I assume you agree that this test has the correct behavior?
>
>
> I believe the first `static_assert` is incorrect, `const` is shallow so it should be just `int&`.


BTW your correct.


http://reviews.llvm.org/D14839





More information about the cfe-commits mailing list