mirror of
https://github.com/matrix-construct/construct
synced 2025-03-13 21:10:32 +01: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>
|
||||
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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue