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

关于win 中引用当前workspace库 使用c++14报错的问题 #34

Open
yukai09020 opened this issue Dec 13, 2023 · 4 comments
Open

Comments

@yukai09020
Copy link

在 C++14 中,命名空间的嵌套声明需要使用单独的语句,而不能像您提供的头文件中那样直接进行嵌套声明。
即需:
namespace wsp::details {
xxx
}
---更改为---
namespace wsp{
namespace details {
xxx
}
}

@CodingHanYa
Copy link
Owner

ok,想问一下用的是哪个编译器?

@yukai09020
Copy link
Author

_MSC_VER宏是1935(编译器版本大于等于 MSVC 2015),语言选的是ISO C++14 标准 (/std:c++14)

@yukai09020
Copy link
Author

不过我的__cplusplus宏是199711L(网上说是C++ 98),但我语言选C++17后__cplusplus宏依旧是199711L,但就能正常编译workspace库

@CodingHanYa
Copy link
Owner

ok,已解决

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

No branches or pull requests

2 participants