libstdc++/3035: make_pair overly restrictive

kenny.simpson@gs.com kenny.simpson@gs.com
Fri Jun 1 17:56:00 GMT 2001


>Number:         3035
>Category:       libstdc++
>Synopsis:       make_pair overly restrictive
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jun 01 17:56:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     kenny.simpson@gs.com
>Release:        20010528 snapshot
>Organization:
>Environment:
source
>Description:
In DR 181 it has been determined that make_pair() should
be declared as:
  template <class T1, class T2> pair<T1,T2> make_pair(T1, T2);
however, in bits/stl_pair.h, it gets defined as:
  inline pair<_T1, _T2> make_pair(const _T1 __x, const _T2 __y)

This requires that the types _T1 and _T2 must have const copy
constructors.  This imposes no more than the original declaration,
but the new declaration makes no such demands.  
>How-To-Repeat:

>Fix:
remove the two 'const's
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the Gcc-bugs mailing list