Apologies as I am still not fully versed with Persistent<T,M>. I am trying 
to make an unordered_map of values to values (kind of like js's Map (but I 
can't use that)).

So ideally something like: unordered_map<Peristent<v8::Value>, 
Persistent<v8::Value> >. The source however specifically refers to 
UniquePersistent (now Global)
for this:

 * C++11 embedders can use STL containers with UniquePersistent values,
 * but pre-C++11 does not support the required move semantic and hence
 * may want these container classes.


So I guess my first questions is what map<UniquePersistent, UniquePersistent> 
gets me instead of map<Persistent, Persistent>. Separately, 

I went ahead and started implementing this (required me to write hasher and 
equal for unordered_map), and get this error:


struct v8_value_hash

{

    size_t operator()(const UniquePersistent<v8::Value> & aPersistentKey) { ... 
}

}


struct v8_value_equal_to
{
    bool operator()(const UniquePersistent<v8::Value> & lhsPersistentKey, const 
UniquePersistent<v8::Value> & rhsPersistentKey) const { ... }

}


And I get:


error: 

      the parameter for this explicitly-defaulted copy constructor is const, 
but a member or base requires it to be non-const

    pair(const pair& __p) = default;

    ^


Thanks!


-- 
-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to