boostorg / wave

Boost.org wave module
http://boost.org/libs/wave
21 stars 49 forks source link

Support #embed #131

Open jefftrull opened 3 years ago

jefftrull commented 3 years ago

This mechanism for creating arrays from binary files at compile time looks likely to land in C++23

hkaiser commented 3 years ago

Adding support for #embed would definitely be a Good Thing(tm), however it most likely wouldn't give the benefit of using the same by a 'real' compiler. Wave would have to translate the content of the file into a comma-separated sequence of bytes, while 'real' compilers could load things into memory directly without representing the content as a character sequence just to convert it back into the binary representation that will be embedded in the object file..

jefftrull commented 1 year ago

Just landed in C23, writeup here https://thephd.dev/finally-embed-in-c23

jefftrull commented 9 months ago

A PR for this has been submitted to Clang now https://github.com/llvm/llvm-project/pull/68620

jefftrull commented 8 months ago

Some thoughts on implementation here