mirror of
https://github.com/matrix-construct/construct
synced 2024-10-06 15:48:53 +02:00
ircd::mods: Improve symbol pointer.
This commit is contained in:
parent
acf948ef8f
commit
1a4139ffaf
1 changed files with 9 additions and 2 deletions
|
@ -105,9 +105,15 @@ class sym_ptr
|
||||||
};
|
};
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
struct sym_ref
|
struct import
|
||||||
:protected sym_ptr
|
: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 const T &() const { return sym_ptr::operator*<T>(); }
|
||||||
operator T &() { return sym_ptr::operator*<T>(); }
|
operator T &() { return sym_ptr::operator*<T>(); }
|
||||||
|
|
||||||
|
@ -138,6 +144,7 @@ bool loaded(const std::string &name);
|
||||||
namespace ircd {
|
namespace ircd {
|
||||||
|
|
||||||
using mods::module; // Bring struct module into main ircd::
|
using mods::module; // Bring struct module into main ircd::
|
||||||
|
using mods::import;
|
||||||
|
|
||||||
} // namespace ircd
|
} // namespace ircd
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue