This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 115e. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2024-11-11


1463. extern "C" alias templates

Section: 13.1  [temp.pre]     Status: drafting     Submitter: Daveed Vandevoorde     Date: 2011-08-19     Liaison: EWG

Currently 13.1 [temp.pre] paragraph 6 forbids any template from having C linkage. Should alias templates be exempt from this prohibition, since they do not have any linkage?

Additional note, April, 2013:

It was suggested that relaxing this restriction for alias templates could provide a way of addressing the long-standing lack of a way of specifying a language linkage for a dependent function type (see issue 13).

Rationale (April, 2013):

CWG felt that this suggested use of alias templates should be considered in a broader context and thus was more appropriate for EWG.

EWG 2022-11-11

extern "C" on a template should be allowed, and should affect only calling convention, but not mangling. This is tracked in github issue cplusplus/papers#1373.