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

关于 C++11 特性的考虑 #5

Closed
frederick-vs-ja opened this issue Nov 28, 2019 · 1 comment
Closed

关于 C++11 特性的考虑 #5

frederick-vs-ja opened this issue Nov 28, 2019 · 1 comment

Comments

@frederick-vs-ja
Copy link
Contributor

目前看来这些代码并没有按照 C++11 前和 C++11 开始条件编译。假如这是有意的,那么我认为有些细节实现应当继续改进:

  • def.h 应当直接使用 <cstdint> 或者 <stdint.h> 。其他代码应该直接使用 (u)intN_t 以减少冲突。
  • 应该使用标准的 thread_local 代替 __thread
  • 原子对象应当使用 <atomic>
  • swap 函数和移动特殊成员函数应当加上 noexcept
    (以及其他可能存在的问题)
@idealvin
Copy link
Owner

前面三个应该只是使用习惯问题,最后那个加 noexcept 的建议,倒是可以引进来,可以帮忙提个pr

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