◐ Shell
clean mode source ↗

[cpp.embed.param.limit]

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]