简体   繁体   中英

How to generate boost uuid from string at compile time

有没有办法在编译时从类似988A00C4-79F3-46f9-98CD-D5AD4AA2A0FE的字符串生成增强型uuid?

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 (ie compile-time lists of characters).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM