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

Agustín Bergé via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 10 07:37:08 PST 2015


K-ballo marked 2 inline comments as done.
K-ballo added a comment.

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&`.


http://reviews.llvm.org/D14839





More information about the cfe-commits mailing list