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

### 700. N1856 defines struct `identity`

Section: 20.2.4 [forward] Status: CD1 Submitter: P.J. Plauger Opened: 2007-07-01 Last modified: 2016-01-28

Priority: Not Prioritized

View all other issues in [forward].

View all issues with CD1 status.

Discussion:

N1856 defines struct `identity` in `<utility>` which clashes with the traditional definition of struct `identity` in `<functional>` (not standard, but a common extension from old STL). Be nice if we could avoid this name clash for backward compatibility.

Proposed resolution:

Change 20.2.4 [forward]:

>     template <class T> struct identity
>     {
>         typedef T type;
>         const T& operator()(const T& x) const;
>     };

> >     const T& operator()(const T& x) const;

> > > Returns: `x`.