1 Star 6 Fork 2

Eterfree / ThreadPool

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
Common.hpp 968 Bytes
一键复制 编辑 原始数据 按行查看 历史
许聪 提交于 2023-11-26 03:06 . update v2.3.0
#pragma once
#ifndef __cplusplus
#error The file requires a C++ compiler.
#endif
// 字符串化
#define STRING(content) #content
// 拼接
#define SPLICE(front, back) front##back
// 弃用
#define DEPRECATED \
[[deprecated("The name for this item is deprecated.")]]
// 替换
#define REPLACEMENT(signature) \
[[deprecated("The name for this item is deprecated. " \
"Instead, use the name: " STRING(signature) ".")]]
// 自定义名称空间
#define ETERFREE_SPACE Eterfree
#define ETERFREE_SPACE_BEGIN namespace ETERFREE_SPACE {
#define ETERFREE_SPACE_END }
#define USING_ETERFREE_SPACE using namespace ETERFREE_SPACE;
ETERFREE_SPACE_BEGIN
//template <typename _Type, const decltype(sizeof 0) _SIZE>
//constexpr auto size(_Type(&_array)[_SIZE]) noexcept
//{
// return sizeof _array / sizeof _array[0];
//}
template <typename _Type, const decltype(sizeof 0) _SIZE>
constexpr auto size(_Type(&_array)[_SIZE]) noexcept
{
return _SIZE;
}
ETERFREE_SPACE_END
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/eterfree/ThreadPool.git
git@gitee.com:eterfree/ThreadPool.git
eterfree
ThreadPool
ThreadPool
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891