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

Section: 23.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.

Discussion:

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:

23.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>&);