diff options
Diffstat (limited to 'include/inspircd.h')
-rw-r--r-- | include/inspircd.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/inspircd.h b/include/inspircd.h index dab00d31c..4850d5a03 100644 --- a/include/inspircd.h +++ b/include/inspircd.h @@ -50,6 +50,17 @@ CoreExport extern InspIRCd* ServerInstance; +/** Base class for manager classes that are still accessed using -> but are no longer pointers + */ +template <typename T> +struct fakederef +{ + T* operator->() + { + return static_cast<T*>(this); + } +}; + #include "config.h" #include "dynref.h" #include "consolecolors.h" |