633. Return clause mentions undefined "type()"

Section: 23.14.13.2.5 [func.wrap.func.targ] Status: NAD Editorial Submitter: Daniel Krügler Opened: 2007-02-03 Last modified: 2016-02-10

Priority: Not Prioritized

View all other issues in [func.wrap.func.targ].

View all issues with NAD Editorial status.

Discussion:

23.14.13.2.5 [func.wrap.func.targ], p4 says:

Returns: If type() == typeid(T), a pointer to the stored function target; otherwise a null pointer.

  1. There exists neither a type, a typedef type, nor member function type() in class template function nor in the global or std namespace.
  2. Assuming that type should have been target_type(), this description would lead to false results, if T = cv void due to returns clause 23.14.13.2.5 [func.wrap.func.targ], p1.

Proposed resolution:

Change 23.14.13.2.5 [func.wrap.func.targ], p4:

Returns: If type() target_type() == typeid(T) && typeid(T) != typeid(void), a pointer to the stored function target; otherwise a null pointer.

[ Pete: Agreed. It's editorial, so I'll fix it. ]