Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[字符编码那些事] main.cpp:80:17: 错误:call to consteval function ‘fmt::v10::basic_format_string<char, char32_t&>("U+{:04X}")’ is not a constant expression 80 | fmt::println("U+{:04X}", u32[1]); #77

Open
CrossroadW opened this issue Jan 1, 2025 · 0 comments · May be fixed by #78

Comments

@CrossroadW
Copy link
Contributor

尝试编译这段代码,出错

方法1:使用 `utf8to32` 一次性完成转换,用完后再转回去。

完整错误 gist.github

image

编译指令

awe@utf8_lib_test$ g++ main.cpp  -std=c++23 -lfmt -I/home/awe/Desktop/dev/utfcpp/source

系统fedora40
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant