Title
Comma-delimited vs. comma-separated output for #embed
Status
ready
Section
15.4.1 [cpp.embed.gen]
Submitter
Hubert Tong

Created on 2025-02-15.00:00:00 last changed 1 week ago

Messages

Date: 2025-06-20.09:48:13

Proposed resolution (approved by CWG 2025-06-20):

Change in 15.4.1 [cpp.embed.gen] paragraph 7 and paragraph 8 as follows:

The #embed directive is replaced by a comma-delimited comma-separated list of integer literals of type int, unless otherwise modified by embed parameters (15.4.2 [cpp.embed.param]).

The integer literals in the comma-delimited comma-separated list correspond to resource-count consecutive calls to std::fgetc (31.13.1 [cstdio.syn]) from the resource, as a binary file. If any call to std::fgetc returns EOF, the program is ill-formed.

Date: 2025-06-20.09:48:13

Subclause 15.4.1 [cpp.embed.gen] paragraph 7 specifies "comma-delimited" output for #embed. However, that allows for a trailing comma that is undesirable.

History
Date User Action Args
2025-06-20 09:48:13adminsetmessages: + msg8038
2025-06-20 09:48:13adminsetstatus: open -> ready
2025-02-15 00:00:00admincreate