0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-07-05 18:18:35 +02:00

ircd::mods: Improve symbol pointer.

This commit is contained in:
Jason Volk 2017-03-30 15:54:04 -07:00
parent acf948ef8f
commit 1a4139ffaf

View file

@ -105,9 +105,15 @@ class sym_ptr
};
template<class T>
struct sym_ref
:protected sym_ptr
struct import
:sym_ptr
{
const T *operator->() const { return sym_ptr::operator-><T>(); }
T *operator->() { return sym_ptr::operator-><T>(); }
const T &operator*() const { return sym_ptr::operator*<T>(); }
T &operator*() { return sym_ptr::operator*<T>(); }
operator const T &() const { return sym_ptr::operator*<T>(); }
operator T &() { return sym_ptr::operator*<T>(); }
@ -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