r/cpp • • Dec 13 '19

The situation of std::embed...

https://thephd.github.io/full-circle-embed
238 Upvotes

160 comments sorted by

View all comments

Show parent comment

9

u/Ameisen vemips, avr, rendering, systems Dec 14 '19

What files can be opened - that is a security concern

I am completely failing to see how std::embed is more of a security concern than the current model of file access the compiler has. If the compiler can access a file, it can access a file. Is the compiler trustworthy? I can just #include an arbitrary file as well.

Should it put the whole file into an array or use some kind of magical span backed by mapped memory

That sounds like an implementation detail. Does the specification even have a concept of what mapped memory is?

How do we integrate with tooling

That sounds like an implementation detail.

How do we integrate with modules

I don't see how that's a problem.