提交 cf86825c 编写于 作者: 独孤过's avatar 独孤过

rename source/Core.hpp to Common.hpp

上级 55c59069
......@@ -6,7 +6,7 @@ ThreadPool is a lightweight and highly concurrent thread pool for Eterfree libra
Copyright © 2017 CDU Innovation Studio. Some Rights Reserved.
## Source Code
[Core.hpp](./source/Core.hpp)
[Common.hpp](./source/Common.hpp)
[DoubleQueue.hpp](./source/DoubleQueue.hpp)
[Condition.hpp](./source/Condition.hpp)
[Thread.h](./source/Thread.h)
......
#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_BEGIN namespace eterfree {
#define ETERFREE_SPACE_END }
#define USING_ETERFREE_SPACE using namespace eterfree;
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
......@@ -39,7 +39,7 @@
#include <mutex>
#include <condition_variable>
#include "Core.hpp"
#include "Common.hpp"
ETERFREE_SPACE_BEGIN
......
#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_BEGIN namespace eterfree {
#define ETERFREE_SPACE_END }
#define USING_ETERFREE_SPACE using namespace eterfree;
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
#include "Common.hpp"
......@@ -29,7 +29,7 @@
#include <atomic>
#include <mutex>
#include "Core.hpp"
#include "Common.hpp"
ETERFREE_SPACE_BEGIN
......
......@@ -49,7 +49,7 @@
#include <thread>
#include <mutex>
#include "Core.hpp"
#include "Common.hpp"
ETERFREE_SPACE_BEGIN
......
......@@ -54,7 +54,7 @@
#include <list>
#include <mutex>
#include "Core.hpp"
#include "Common.hpp"
ETERFREE_SPACE_BEGIN
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册