clang 变量名称的 unicode 字符

发布于 2024-08-29 18:01:20 字数 285 浏览 3 评论 0原文

cat test.cpp

#include <iostream>

int main() {
  int à;
}

结果:

clang++ test.cpp
test.cpp:4:7: error: expected unqualified-id
  int à;
      ^
1 error generated.

现在,有没有办法让 clang 允许 unicode 变量名称?

谢谢!

cat test.cpp

#include <iostream>

int main() {
  int à;
}

results in:

clang++ test.cpp
test.cpp:4:7: error: expected unqualified-id
  int à;
      ^
1 error generated.

Now, is there a way to get clang to allow unicode variable names?

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

踏雪无痕 2024-09-05 18:01:20

虽然标准允许这样做,但 Clang 目前不支持标识符中的 UCN(通用字符名称)。

While this is allowed by the standard, Clang does not currently support UCN (universal character name)s in identifiers.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文