From 1a4139ffaf6d3920f024ad0881959ab717fdfb76 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Thu, 30 Mar 2017 15:54:04 -0700 Subject: [PATCH] ircd::mods: Improve symbol pointer. --- include/ircd/mods.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/include/ircd/mods.h b/include/ircd/mods.h index 550ca83de..fcb00946c 100644 --- a/include/ircd/mods.h +++ b/include/ircd/mods.h @@ -105,9 +105,15 @@ class sym_ptr }; template -struct sym_ref -:protected sym_ptr +struct import +:sym_ptr { + const T *operator->() const { return sym_ptr::operator->(); } + T *operator->() { return sym_ptr::operator->(); } + + const T &operator*() const { return sym_ptr::operator*(); } + T &operator*() { return sym_ptr::operator*(); } + operator const T &() const { return sym_ptr::operator*(); } operator T &() { return sym_ptr::operator*(); } @@ -138,6 +144,7 @@ bool loaded(const std::string &name); namespace ircd { using mods::module; // Bring struct module into main ircd:: +using mods::import; } // namespace ircd