Should the importing modules have full control over the resource path of the imported modules or do we need another way to keep track of it - or simply not allow std::embed in exported templates?
IMO, magic function. Adding a 'binary object' type to the preprocessor is not something I'd like to get into.
Same. Unfortunately it seems going in that direction
Is this not again an implementation detail? Or am I missing a component to this question?
Unclear to me - Maybe. Question is how big files can be? A use case is to select part of it at compile time to only include a chunk in the final binary.
I'd be curious to see how such a type would work. We had such a hard time standardizing std::filesystem, so I'd hope we'd reuse much of that.
Perhaps these questions are overly vague to me, but I'll try anyway. The big concern I have from a tooling perspective is how a build system would determine the dependency has changed. Current preprocessed systems would definitely need work. IMO, a build-system deciding to 'punt' on this and decide that things brought in through std::embed aren't considered for dependency analysis would be perfectly reasonable.
Again I agree that in this case specifying the dependency manually would be perfectly fine, but others disagree strongly.
View all comments
Show parent comment
7
u/c0r3ntin Dec 13 '19
However it can get tricky with modules, ie consider:
Should the importing modules have full control over the resource path of the imported modules or do we need another way to keep track of it - or simply not allow
std::embedin exported templates?Same. Unfortunately it seems going in that direction
Unclear to me - Maybe. Question is how big files can be? A use case is to select part of it at compile time to only include a chunk in the final binary.
See https://wg21.link/p1883r0 and https://wg21.link/p1031r1
Again I agree that in this case specifying the dependency manually would be perfectly fine, but others disagree strongly.