mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-10 17:01:24 +12:00
Make RPCS3 compile in C++2a mode
This commit is contained in:
parent
e9e8f0c5b7
commit
1a78e0e80c
13 changed files with 141 additions and 109 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue