mirror of
https://github.com/matrix-construct/construct
synced 2024-12-26 15:33:54 +01:00
ircd::js: Allow value copy.
This commit is contained in:
parent
333b0dca5a
commit
bfb5948191
1 changed files with 7 additions and 0 deletions
|
@ -67,6 +67,7 @@ struct value
|
|||
value(JS::Symbol *const &);
|
||||
value(const JS::Value &);
|
||||
value();
|
||||
value(const value &);
|
||||
};
|
||||
|
||||
template<lifetime L> JSType type(const value<L> &);
|
||||
|
@ -89,6 +90,12 @@ value<L>::value()
|
|||
{
|
||||
}
|
||||
|
||||
template<lifetime L>
|
||||
value<L>::value(const value &other)
|
||||
:value<L>::root::type{other.get()}
|
||||
{
|
||||
}
|
||||
|
||||
template<lifetime L>
|
||||
value<L>::value(const JS::Value &val)
|
||||
:value<L>::root::type{val}
|
||||
|
|
Loading…
Reference in a new issue