GlobalConfig中的静态变量变为可选extern
This commit is contained in:
@@ -267,9 +267,9 @@ constexpr int ConstexprStrCompare(
|
||||
#define __PLATFORM_VERSION "Unknown"
|
||||
#endif // __PLATFORM_VERSION
|
||||
|
||||
#ifndef PLATFORM_EXTENSION
|
||||
#define PLATFORM_EXTENSION ""
|
||||
#endif // PLATFORM_EXTENSION
|
||||
#ifndef __PLATFORM_EXTENSION
|
||||
#define __PLATFORM_EXTENSION ""
|
||||
#endif // __PLATFORM_EXTENSION
|
||||
|
||||
struct PlatformIndicator
|
||||
: public
|
||||
@@ -328,7 +328,6 @@ struct PlatformIndicator
|
||||
constexpr static bool IsGNUC = false;
|
||||
#endif // __GNUC__
|
||||
|
||||
|
||||
constexpr static const char* PlatformInfomation = __PLATFORM_NAME "-" __PLATFORM_VERSION "-" __PLATFORM_EXTENSION;
|
||||
// not lock current thread, if input is exist will return it otherwise return -1
|
||||
static int KeyboardInput() noexcept;
|
||||
@@ -1966,7 +1965,8 @@ namespace Convention
|
||||
/**
|
||||
* @brief 拷贝赋值函数
|
||||
*/
|
||||
virtual instance& operator=(const instance& value) noexcept
|
||||
template<typename = std::declval<instance>().WriteValue(std::declval<instance>().ReadConstValue())>
|
||||
instance& operator=(const instance& value) noexcept
|
||||
{
|
||||
if constexpr (IsUnique)
|
||||
{
|
||||
@@ -1979,6 +1979,21 @@ namespace Convention
|
||||
return *this;
|
||||
}
|
||||
/**
|
||||
* @brief 拷贝赋值函数
|
||||
*/
|
||||
virtual instance& operator=(const instance& value) noexcept
|
||||
{
|
||||
if constexpr (IsUnique)
|
||||
{
|
||||
throw std::runtime_error("unique ptr is not support to copy");
|
||||
}
|
||||
else
|
||||
{
|
||||
_Mybase::operator=(value);
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
/**
|
||||
* @brief 移动赋值函数
|
||||
*/
|
||||
virtual instance& operator=(instance&& value) noexcept
|
||||
|
Reference in New Issue
Block a user