[fund.ts.v3] Does observer_ptr support function types?
Alisdair Meredith

Created on 2018-11-14.00:00:00, last changed 2018-11-27.04:34:19.


Date: 2018-11-27.04:34:19

[ 2018-11 Reflector prioritization ]

Set Priority to 3

Date: 2018-11-14.00:00:00

Addresses: fund.ts.v3

From the wording, function pointers are never clearly considered. P1 infers support for only objects, but it is not clear that wording is intended to be a deliberate restriction, or is casual wording.

Paragraph 2 mandates that we cannot instantiate for reference types, and do support incomplete types, but still does not consider function types. Calling out references specifically, as they are not object types, suggests the inferred support for only objects in p1 is more a case of casual phrasing, than deliberate intent.

However, if we did intend to support function pointers, we may want to consider adding a function-call operator, constrained to supporting pointer-to function types. One other possibility is that the explicit conversion to pointer already serves that purpose, although I need to double-check the core language that contextual conversions to function pointer are considered when invoking the function call operator. If this is the case, then I suggest a note to that effect in [memory.observer.ptr.conv] instead.

Date User Action Args
2018-11-27 04:34:19adminsetmessages: + msg10237
2018-11-14 00:00:00admincreate