future_cxx
future_cxx copied to clipboard
P1967 - #embed
#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
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...
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.
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
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
C++: https://thephd.github.io/_vendor/future_cxx/papers/published/p1967r2.html
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 usesunsigned 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
Thanks for looking out; these have all been edited / fixed.
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
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
Added to C23; only C++26 part left.
Submitted the latest for this: https://wg21.link/p1967r12