A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cplusplus.github.io/CWG/issues/2386.html below:

CWG Issue 2386

This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 117b. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2025-08-11

2386. tuple_size requirements for structured bindingSection: 9.7  [dcl.struct.bind]     Status: CD5     Submitter: Stephan T. Lavavej     Date: 2018-09-19

[Accepted as a DR at the February, 2019 meeting.]

According to 9.7 [dcl.struct.bind] paragraph 4,

Otherwise, if the qualified-id std::tuple_size<E> names a complete type, the expression std::tuple_size<E>::value shall be a well-formed integral constant expression and the number of elements in the identifier-list shall be equal to the value of that expression.

However, the common idiom in the library is that SFINAE tests the presence or absence of a value member rather than the completeness of the class; see 22.4.7 [tuple.helper] paragraph 4. The core language requirement should be changed to match the common library practice.

Proposed resolution (December, 2018):

Change 9.6 [dcl.fct.def] paragraph 4 as follows:

Otherwise, if the qualified-id std::tuple_size<E> names a complete class type with a member value, the expression std::tuple_size<E>::value shall be a well-formed integral constant expression and the number of elements in the identifier-list shall be equal to the value of that expression...

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4