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

Eric Fiselier via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 9 13:05:02 PST 2015


EricWF added a comment.

To expand on my concerns about lvalue elements, I would like to see tests something like this:

  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?


http://reviews.llvm.org/D14839





More information about the cfe-commits mailing list