mirror of
https://github.com/matrix-construct/construct
synced 2024-12-25 23:14:13 +01:00
ircd::js: Disambiguate vector<value> initializer list constructor.
This commit is contained in:
parent
7e18e32ce4
commit
b9137fd475
1 changed files with 4 additions and 2 deletions
|
@ -68,15 +68,17 @@ struct vector<value>
|
|||
handle(): JS::HandleValueArray{JS::HandleValueArray::empty()} {}
|
||||
};
|
||||
|
||||
/*
|
||||
// Construct vector from initializer list of raw `JS::Value`
|
||||
// ex: JS::Value a; vector foo {{ a, a, ... }};
|
||||
vector(const std::initializer_list<jsapi_type> &list)
|
||||
explicit vector(const std::initializer_list<jsapi_type> &list)
|
||||
:JS::AutoVectorRooter<jsapi_type>{*cx}
|
||||
{
|
||||
reserve(list.size());
|
||||
for(auto &t : list)
|
||||
infallibleAppend(t);
|
||||
}
|
||||
*/
|
||||
|
||||
// Construct from initializer list of our `struct value` wrapper
|
||||
// ex: value a(1); vector foo {{ a, a, ... }};
|
||||
|
@ -85,7 +87,7 @@ struct vector<value>
|
|||
{
|
||||
reserve(list.size());
|
||||
for(auto &t : list)
|
||||
infallibleAppend(t.get());
|
||||
infallibleAppend(t);
|
||||
}
|
||||
|
||||
// Construct from initializer list of any type passed through `struct value` ctor
|
||||
|
|
Loading…
Reference in a new issue