This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of NAD Editorial status.

1061. Bad indexing for tuple access to pair (Editorial?)

Section: 19.4.4 [pair.astuple] Status: NAD Editorial Submitter: Alisdair Meredith Opened: 2009-03-13 Last modified: 2016-02-10

Priority: Not Prioritized

View all other issues in [pair.astuple].

View all issues with NAD Editorial status.


The definition of get implies that get must return the second element if given a negative integer.

[ Batavia (2009-05): ]

Move to NAD Editorial.

Proposed resolution:

19.4.4 [pair.astuple] p5:

template<int size_t I, class T1, class T2> 
  requires True<(I < 2)> 
  const P& get(const pair<T1, T2>&);