You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this is not an issue but more a question about the library usage. Let's say I have a struct like this:
structA
{
//some datachar* data;
// and integer used for orderinguint32_t size;
booloperator>(const A& other) const
{
return size > other.size;
}
};
I'm using the LazyList as a container for that struct. The ordering for that list is std::greater<A> (which uses the operator> of the list). Is is possible to use a function that returns an element of the list that is inferior or equal to some input node (like upper_bound does in the standard library)?
In other word, is there a container in libcds that can achieve that?
The text was updated successfully, but these errors were encountered:
Hi,
no, libcds containers don't provide functions like upper_bound/lower_bound, only exact match is supported. In concurrent environment these functions don't make sense. For example, I found upper bound for some key but other concurrent thread inserts another key that match better for upper bound.
Good morning,
this is not an issue but more a question about the library usage. Let's say I have a struct like this:
I'm using the
LazyList
as a container for that struct. The ordering for that list isstd::greater<A>
(which uses theoperator>
of the list). Is is possible to use a function that returns an element of the list that is inferior or equal to some input node (likeupper_bound
does in the standard library)?In other word, is there a container in
libcds
that can achieve that?The text was updated successfully, but these errors were encountered: