开发者

clang unicode characters for variable name

开发者 https://www.devze.com 2022-12-27 13:28 出处:网络
cat test.cpp #include <iostream> int main() { int à; } results in: clang++ test.c开发者_如何学编程pp

cat test.cpp

#include <iostream>

int main() {
  int à;
}

results in:

clang++ test.c开发者_如何学编程pp
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!


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

0

精彩评论

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