Make RPCS3 compile in C++2a mode
This commit is contained in:
+18
-1
@@ -68,6 +68,13 @@ namespace logs
|
||||
{
|
||||
}
|
||||
|
||||
private:
|
||||
#if __cpp_char8_t >= 201811
|
||||
using char2 = char8_t;
|
||||
#else
|
||||
using char2 = uchar;
|
||||
#endif
|
||||
|
||||
#define GEN_LOG_METHOD(_sev)\
|
||||
const message msg_##_sev{this, level::_sev};\
|
||||
template <std::size_t N, typename... Args>\
|
||||
@@ -78,8 +85,18 @@ namespace logs
|
||||
static constexpr fmt_type_info type_list[sizeof...(Args) + 1]{fmt_type_info::make<fmt_unveil_t<Args>>()...};\
|
||||
msg_##_sev.broadcast(fmt, type_list, u64{fmt_unveil<Args>::get(args)}...);\
|
||||
}\
|
||||
}
|
||||
}\
|
||||
template <std::size_t N, typename... Args>\
|
||||
void _sev(const char2(&fmt)[N], const Args&... args)\
|
||||
{\
|
||||
if (UNLIKELY(level::_sev <= enabled.load(std::memory_order_relaxed)))\
|
||||
{\
|
||||
static constexpr fmt_type_info type_list[sizeof...(Args) + 1]{fmt_type_info::make<fmt_unveil_t<Args>>()...};\
|
||||
msg_##_sev.broadcast(reinterpret_cast<const char*>(+fmt), type_list, u64{fmt_unveil<Args>::get(args)}...);\
|
||||
}\
|
||||
}\
|
||||
|
||||
public:
|
||||
GEN_LOG_METHOD(fatal)
|
||||
GEN_LOG_METHOD(error)
|
||||
GEN_LOG_METHOD(todo)
|
||||
|
||||
Reference in New Issue
Block a user