0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-16 06:51:08 +01:00

ircd: Fix default arguments in exception macros for clang.

This commit is contained in:
Jason Volk 2019-06-21 04:17:20 -06:00
parent 95e0ff3bbc
commit 5c8e590219

View file

@ -155,17 +155,24 @@ struct name \
:parent \ :parent \
{ \ { \
template<class... args> \ template<class... args> \
name(const string_view &fmt = " ", args&&... ap) noexcept \ name(const string_view &fmt, args&&... ap) noexcept \
:parent{generate_skip} \ :parent{generate_skip} \
{ \ { \
generate(#name, fmt, ircd::va_rtti{std::forward<args>(ap)...}); \ generate(#name, fmt, ircd::va_rtti{std::forward<args>(ap)...}); \
} \ } \
\ \
template<class... args> \
name(const string_view &fmt = " ") noexcept \
:parent{generate_skip} \
{ \
generate(#name, fmt, ircd::va_rtti{}); \
} \
\
name(generate_skip_t) noexcept \ name(generate_skip_t) noexcept \
:parent{generate_skip} \ :parent{generate_skip} \
{ \ { \
} \ } \
}; \ };
/// Hides the name of the exception when generating a string /// Hides the name of the exception when generating a string
#define IRCD_EXCEPTION_HIDENAME(parent, name) \ #define IRCD_EXCEPTION_HIDENAME(parent, name) \
@ -173,12 +180,19 @@ struct name \
:parent \ :parent \
{ \ { \
template<class... args> \ template<class... args> \
name(const string_view &fmt = " ", args&&... ap) noexcept \ name(const string_view &fmt, args&&... ap) noexcept \
:parent{generate_skip} \ :parent{generate_skip} \
{ \ { \
generate(fmt, ircd::va_rtti{std::forward<args>(ap)...}); \ generate(fmt, ircd::va_rtti{std::forward<args>(ap)...}); \
} \ } \
\ \
template<class... args> \
name(const string_view &fmt = " ") noexcept \
:parent{generate_skip} \
{ \
generate(fmt, ircd::va_rtti{}); \
} \
\
name(generate_skip_t = {}) noexcept \ name(generate_skip_t = {}) noexcept \
:parent{generate_skip} \ :parent{generate_skip} \
{ \ { \
@ -197,18 +211,26 @@ struct name \
:parent \ :parent \
{ \ { \
template<class... args> \ template<class... args> \
name(const string_view &fmt = " ", args&&... ap) noexcept \ name(const string_view &fmt, args&&... ap) noexcept \
:parent{generate_skip} \ :parent{generate_skip} \
{ \ { \
generate(#name, fmt, ircd::va_rtti{std::forward<args>(ap)...}); \ generate(#name, fmt, ircd::va_rtti{std::forward<args>(ap)...}); \
ircd::panicking(*this); \ ircd::panicking(*this); \
} \ } \
\ \
template<class... args> \
name(const string_view &fmt = " ") noexcept \
:parent{generate_skip} \
{ \
generate(#name, fmt, ircd::va_rtti{}); \
ircd::panicking(*this); \
} \
\
name(generate_skip_t) \ name(generate_skip_t) \
:parent{generate_skip} \ :parent{generate_skip} \
{ \ { \
} \ } \
}; \ };
namespace ircd namespace ircd
{ {