future_cxx icon indicating copy to clipboard operation
future_cxx copied to clipboard

P1967 - #embed

Open ThePhD opened this issue 4 years ago • 11 comments

#embed is a pre-processor directive for the inclusion of binary data into a program through implementation-defined resource lookup.

Latest draft is: https://thephd.github.io/vendor/future_cxx/papers/source/C%20-%20embed

ThePhD avatar Apr 04 '20 23:04 ThePhD

I now have to figure out how

#embed [bits-per-element]opt [max-elements]opt header-name

can be done. Disambiguation of the numeric constant for bits-per-element versus max-elements means you cannot specify just one of them and have the preprocessor know which one...

ThePhD avatar Apr 04 '20 23:04 ThePhD

This paper is on track. The next time it is seen it will just be

#embed [max-elements]opt header-name

It will always produce a comma-delimited sequence of unsigned char. Just need to update the paper now.

ThePhD avatar Sep 25 '20 23:09 ThePhD

Posted: http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2592.htm

Latest: https://thephd.github.io/vendor/future_cxx/papers/C%20-%20embed

ThePhD avatar Nov 22 '20 08:11 ThePhD

The wording needed a lot of work, so we fixed it up quite a bit:

https://thephd.github.io/_vendor/future_cxx/papers/C%20-%20embed.html

ThePhD avatar Dec 05 '20 06:12 ThePhD

C++: https://thephd.github.io/_vendor/future_cxx/papers/published/p1967r2.html

ThePhD avatar Apr 16 '21 07:04 ThePhD

Not sure where to best put this, but I found this issue so I'll comment here. Comments apply to draft proposal of June 15, 2021.

  • 2.1 "Others pointed out that ... is very dangerous to portably." Should be "portability"?
  • 2.2 The link to std::embed displays the markdown source in the rendered document
  • 3.2.1 "Speed Size". Should this just be "Speed"?
  • 3.2.3 "require an extremely large refactor and functionality add of parser internals" Not sure "add" is the right word here?
  • 4.4 "casted" should probably just be "cast"
  • 4.6 you probably also want to #include <cstdio> if you're including includes in the example
  • 4.6 the section talks about fread() into an array of ints, but the example uses unsigned char
  • 8 the the includecpp.org link is also not rendered correctly
  • 9.1.4 the incbin link isn't rendered correctly
  • 9.2 at the end "the proposal now let’s the implementation "figure it out"" should be "lets" without the apostrophe

When I refer to links that don't render correctly, this is the document I'm looking at: https://thephd.dev/_vendor/future_cxx/papers/d1967.html

vegard avatar Jun 19 '21 11:06 vegard

Thanks for looking out; these have all been edited / fixed.

ThePhD avatar Jun 19 '21 12:06 ThePhD

C++ paper has been split off into it's own thing. Which looks prettier because it uses bikeshed now:

https://thephd.dev/_vendor/future_cxx/papers/d1967.html

ThePhD avatar Jun 19 '21 12:06 ThePhD

C++ and C papers have been properly split up. Wording is based on which link you travel:

https://thephd.dev/_vendor/future_cxx/papers/d1967.html https://thephd.dev/_vendor/future_cxx/papers/C%20-%20embed.html

ThePhD avatar Apr 11 '22 18:04 ThePhD

Added to C23; only C++26 part left.

ThePhD avatar Aug 10 '22 19:08 ThePhD

Submitted the latest for this: https://wg21.link/p1967r12

ThePhD avatar Jan 14 '24 20:01 ThePhD