C++ Logo

std-discussion

Advanced search

Possible std::ranges::subrange defect?

From: Keenan Horrigan <friedkeenan_at_[hidden]>
Date: Fri, 17 Sep 2021 23:20:47 +0000
Hi, this is my first time really using a mailing list so apologies if I do anything wrong.

I've been looking at std::ranges::subrange, and I think the "pair-like" concept used for converting to a pair-like type might be slightly broken? It requires std::tuple_size<T> to be derived from std::integral_constant<std::size_t, 2>, but in the specification for structured binding, as far as I can tell, it only requires `std::tuple_size<T>::value` to be a "well-formed integral constant expression", with no requirement for being related to std::integral_constant. Is it intentional that this "pair-like" concept is stricter than the requirements for structured binding?

Received on 2021-09-17 18:20:58