[cpp.embed.param.limit] (original) (raw)
15 Preprocessing directives [cpp]
15.4 Resource inclusion [cpp.embed]
15.4.2 Embed parameters [cpp.embed.param]
15.4.2.1 limit parameter [cpp.embed.param.limit]
[Example 1: #undef DATA_LIMIT#if __has_embed(<data.dat> limit(DATA_LIMIT)) #endif
#if __has_embed(<data.dat> limit(0)) #endif — _end example_]
[Example 2: #embed <data.dat> limit(__has_include("a.h")) #if __has_embed(<data.dat> limit(__has_include("a.h"))) #endif — _end example_]
The constant-expression shall be an integral constant expression whose value is greater than or equal to zero.
[Example 3: constexpr unsigned char sound_signature[] = { #embed <sdk/jump.wav> limit(2+2) };static_assert(sizeof(sound_signature) == 4); — _end example_]