[cpp.embed.param.if.empty] (original) (raw)
15 Preprocessing directives [cpp]
15.4 Resource inclusion [cpp.embed]
15.4.2 Embed parameters [cpp.embed.param]
15.4.2.4 if_empty parameter [cpp.embed.param.if.empty]
[Example 1:
limit(0) affects when a resource is considered empty.
Therefore, the following program:
#embed </owo/uwurandom> \ if_empty(42203) limit(0) expands to42203
— _end example_]
[Example 2:
This resource is considered empty due to the limit(0) embed-parameter, always, including in __has_embed clauses.
int infinity_zero () { #if __has_embed(</owo/uwurandom> limit(0) prefix(some tokens)) == __STDC_EMBED_EMPTY__return 0;#else #error "The resource does not exist" #endif } — _end example_]