开发者

How to generate boost uuid from string at compile time

开发者 https://www.devze.com 2022-12-23 05:00 出处:网络
is there a way to generate a boo开发者_开发知识库st uuid from a string like 988A00C4-79F3-46f9-98CD-D5AD4AA2A0FE at compile time?No, because there is no processing of string literals at compile time i

is there a way to generate a boo开发者_开发知识库st uuid from a string like 988A00C4-79F3-46f9-98CD-D5AD4AA2A0FE at compile time?


No, because there is no processing of string literals at compile time in C++.

Depending on what you need and where you get the string from, you could use a pre-build-step that directly puts it into some aggregate initializer form or something that you can process at compile time (i.e. compile-time lists of characters).

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号