Does C++ have a macro like Rust's include_str!
? Macros similar to include!
or include_bytes
would also meet my requirements.
There's no standard way to do this. There's proposal P1040R6 for std::embed
.
If you want to experiment with this right now, check out https://github.com/ThePhD/embed (which is by the author of the aforementioned proposal). You'll need to patch your compiler though, so it doesn't seem very portable.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With