cplusplus / papers

ISO/IEC JTC1 SC22 WG21 paper scheduling and management
643 stars 18 forks source link

P1040 std::embed #28

Open jensmaurer opened 5 years ago

jensmaurer commented 5 years ago

P1040R3 std::embed (JeanHeyd Meneide)

https://issues.isocpp.org/show_bug.cgi?id=508

jensmaurer commented 5 years ago

P1040R4 std::embed (JeanHeyd Meneide)

jfbastien commented 5 years ago

Seen by EWGI in SAN. Need input from EWG regarding dependency scanning versus constexpr! evaluation, then back to EWGI.

hanickadot commented 4 years ago

Added as a late paper to schedule for SG7 in Belfast

jfbastien commented 4 years ago

EWG in Belfast: http://wiki.edg.com/bin/view/Wg21belfast/P1040-EWG

EWG is interested in hearing more about #embed / #embed_str in the general direction presented.

SF F N A SA
3 11 2 1 2

EWG is interested in hearing more about std::embed in the general direction presented.

SF F N A SA
3 11 2 1 2
jfbastien commented 4 years ago

SG16 will need to discuss #embed_str.

hanickadot commented 4 years ago

Paper was discussed at Belfast meeting in SG7.

hanickadot commented 4 years ago

http://wiki.edg.com/bin/view/Wg21belfast/SG7notesD1040

Poll: Do we want more generic API for such use-case?

SF F N A SA
4 4 3 1 1

Poll: Do we want to specifically name all the resources we can embed?

SF F N A SA
2 5 3 0 2

Poll: Do we want to progress #embed and #embed_str independently?

SF F N A SA
4 1 3 1 2
jfbastien commented 4 years ago

EWG saw this: http://wiki.edg.com/bin/view/Wg21belfast/P1040-EWG

  1. EWG is interested in hearing more of #embed and #embed_str in the general direction
SF F N A SA
3 11 2 1 2
  1. EWG is interested in hearing more of std::embed in the general direction presented today
SF F N A SA
3 11 2 1 2
brycelelbach commented 4 years ago

Tooling wants to see this again.

wg21bot commented 4 years ago

P1040R5 std::embed and #depend (JeanHeyd Meneide)

tahonermann commented 4 years ago

#embed_str has not appeared in any revision of P1040, nor in the related revisions of P1967. According to the author, it was presented and discussed in EWG, but is not included in any current proposal. So, there are no SG16 concerns presently with regard to the encoding of embedded data.

However, there are SG16 concerns with regard to the encoding of file names provided to std::embed. The concern is that std::embed evaluation occurs at translation phase 7, but always runs in constexpr context. Evaluation is post translation phase 5 in which string literals are converted from source code encoding to execution character encoding. In cross-compiler scenarios, for example, a compiler running on Windows (Unicode) targeting z/OS (EBCDIC), a call such as std::embed("filename") would require reverse conversion from EBCDIC to a Unicode encoding in order to resolve the file name. SG16 will discuss this concern in Prague.

tahonermann commented 4 years ago

SG16 discussed P1040R5 in Prague. Meeting minutes available at http://wiki.edg.com/bin/view/Wg21prague/SG16P1040R5

SG16 approved the design modified to only provide char8_t based overloads of std::embed. The author will update the paper. Adding the needs-revision label.

P1040R5: Provide char based overloads irregardless of implementation strategy SF F N A SA
2 1 3 3 3

Consensus? No

P1040R5: Provide wchar_t based overloads irregardless of implementation strategy SF F N A SA
0 0 1 3 8

Consensus? No

P1040R5: Provide char8_t based overloads SF F N A SA
9 2 1 0 0

Consensus? Yes

P1040R5: Provide char16_t based overloads SF F N A SA
0 2 5 3 2

Consensus? No

P1040R5: Provide char32_t based overloads SF F N A SA
0 1 5 1 4

Consensus? No

P1040R5: Forward to EWG/LEWG modified to provide only char8_t-based interfaces SF F N A SA
9 4 0 0 0

Consensus? Yes

jfbastien commented 4 years ago

EWG Prague Wednesday morning:

  1. #depend - We would like to have this feature in C++(something) and spend time figuring out the details
SF F N A SA
14 13 2 0 0
  1. #depend <foo/**> -We want recursive globs (recursively searching through directories) for #depend
SF F N A SA
2 3 9 12 4
  1. It should be mandatory that EVERY file for std::embed is specified by #depend
SF F N A SA
4 12 5 6 3
  1. #depend should form a virtual File System / State that constrains the search and should be passed to std::embed
SF F N A SA
3 11 7 2 2
  1. Make std::embed ill-formed inside of a module interface (with a plan to revisit later)
SF F N A SA
4 2 7 1 1
wg21bot commented 4 years ago

P1040R6 std::embed and #depend (JeanHeyd Meneide)

tahonermann commented 4 years ago

Removing the SG16 label as the latest revision has adequately addressed prior SG16 feedback. I trust that the EWG chair will reach out if further design work warrants additional SG16 feedback.

jfbastien commented 2 years ago

The author let me know that the paper needs a bit more work, including: Virtual File System, Solved the Modules Problem, finished benchmarking globs on Windows, and a host of other issues.