From 892ad69f5bc60cc304aadffa79dc94e09876c771 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Sat, 2 Sep 2017 20:42:46 -0700 Subject: [PATCH] ircd::util: Add IRCD_USING_OVERLOAD macro; minor cleanup. --- include/ircd/util.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/include/ircd/util.h b/include/ircd/util.h index 14609baac..58bc2bf33 100644 --- a/include/ircd/util.h +++ b/include/ircd/util.h @@ -34,9 +34,11 @@ inline namespace util { #define IRCD_UNIQUE(a) IRCD_CONCAT(a, __COUNTER__) -#define IRCD_OVERLOAD(NAME) \ - struct NAME##_t {}; \ - static constexpr NAME##_t NAME {}; +#define IRCD_OVERLOAD(NAME) \ + static constexpr struct NAME##_t {} NAME {}; + +#define IRCD_USING_OVERLOAD(ALIAS, ORIGIN) \ + static constexpr const auto &ALIAS{ORIGIN} #define IRCD_WEAK_TYPEDEF(TYPE, NAME) \