mirror of
https://github.com/matrix-construct/construct
synced 2024-12-26 15:33:54 +01:00
ircd::util: Strengthen the strong typedef.
This commit is contained in:
parent
84383d41d8
commit
25a2dd906c
1 changed files with 7 additions and 7 deletions
|
@ -49,13 +49,13 @@ struct NAME \
|
|||
using TYPE::TYPE; \
|
||||
};
|
||||
|
||||
#define IRCD_STRONG_TYPEDEF(TYPE, NAME) \
|
||||
struct NAME \
|
||||
{ \
|
||||
TYPE val; \
|
||||
\
|
||||
operator const TYPE &() const { return val; } \
|
||||
operator TYPE &() { return val; } \
|
||||
#define IRCD_STRONG_TYPEDEF(TYPE, NAME) \
|
||||
struct NAME \
|
||||
{ \
|
||||
TYPE val; \
|
||||
\
|
||||
explicit operator const TYPE &() const { return val; } \
|
||||
explicit operator TYPE &() { return val; } \
|
||||
};
|
||||
|
||||
#define IRCD_WEAK_T(TYPE) \
|
||||
|
|
Loading…
Reference in a new issue