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

含有编译时错误 #11

Open
Shucheng-Huang opened this issue May 18, 2023 · 1 comment
Open

含有编译时错误 #11

Shucheng-Huang opened this issue May 18, 2023 · 1 comment

Comments

@Shucheng-Huang
Copy link

https://github.com/MengRao/tscns/blob/580322f853f51e9133a8a1b56336fb31f70e78ad/tscns.h#LL146C23-L146C23

alignas(64) std::atomic<uint32_t> param_seq_ = 0;

这里的初始化语句试图调用被deleted的拷贝构造函数,使代码无法通过编译。

可考虑改为:

alignas(64) std::atomic<uint32_t> param_seq_{0};

@pengfengyong
Copy link

alignas(64) std::atomic<uint32_t> param_seq_ = {0}; 也可以的

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