/// Specifies list ordering policy.
/**
If \p sort is \p true, than list maintains items in sorted order, otherwise items are unordered. Default is \p true.
- Note that if \p sort is \p falsem than lookup operations scan entire list.
+ Note that if \p sort is \p false then lookup operations scan entire list.
*/
static const bool sort = true;
}
};
- typedef typename opt::details::make_comparator< key_type, original_type_traits >::type key_comparator;
- typedef typename opt::details::make_equal_to< key_type, original_type_traits >::type equal_to_comparator;
+ typedef typename std::conditional< original_type_traits::sort,
+ typename opt::details::make_comparator< value_type, original_type_traits >::type,
+ typename opt::details::make_equal_to< value_type, original_type_traits >::type
+ >::type key_comparator;
+
template <typename Less>
struct less_wrapper {
{
typedef intrusive::lazy_list::base_hook< opt::gc<gc> > hook;
typedef node_deallocator disposer;
- typedef cds::details::compare_wrapper< node_type, key_comparator, key_field_accessor > compare;
- typedef cds::details::predicate_wrapper< node_type, equal_to_comparator, key_field_accessor > equal_to;
+
+ typedef typename std::conditional< std::is_same< typename original_type_traits::equal_to, cds::opt::none >::value,
+ cds::opt::none,
+ typename equal_to_wrapper< typename original_type_traits::equal_to >::type
+ >::type equal_to;
+
+ typedef typename std::conditional< original_type_traits::sort,
+ cds::details::compare_wrapper< node_type, key_comparator, key_field_accessor >,
+ cds::opt::none
+ >::type compare;
+
static const opt::link_check_type link_checker = cds::intrusive::lazy_list::traits::link_checker;
};
}
};
- typedef typename opt::details::make_comparator< value_type, original_type_traits >::type key_comparator;
- typedef typename opt::details::make_equal_to< value_type, original_type_traits >::type equal_to_comparator;
+ typedef typename std::conditional< original_type_traits::sort,
+ typename opt::details::make_comparator< value_type, original_type_traits >::type,
+ typename opt::details::make_equal_to< value_type, original_type_traits >::type
+ >::type key_comparator;
struct value_accessor {
value_type const & operator()( node_type const & node ) const
typedef node_deallocator disposer;
static CDS_CONSTEXPR const opt::link_check_type link_checker = cds::intrusive::lazy_list::traits::link_checker;
- typedef cds::details::compare_wrapper< node_type, key_comparator, value_accessor > compare;
- typedef cds::details::predicate_wrapper< node_type, equal_to_comparator, value_accessor > equal_to;
+ typedef typename std::conditional< std::is_same< typename original_type_traits::equal_to, cds::opt::none >::value,
+ cds::opt::none,
+ typename equal_to_wrapper< typename original_type_traits::equal_to >::type
+ >::type equal_to;
+
+ typedef typename std::conditional< original_type_traits::sort,
+ typedef cds::details::compare_wrapper< node_type, key_comparator, value_accessor >,
+ cds::opt::none
+ >::type compare;
};
typedef intrusive::LazyList<gc, node_type, intrusive_traits> type;
typedef typename base_class::item_counter item_counter; ///< Item counting policy used
typedef typename maker::key_comparator key_comparator; ///< key comparison functor
typedef typename base_class::memory_model memory_model; ///< Memory ordering. See cds::opt::memory_model option
+ static CDS_CONSTEXPR bool const c_bSort = base_class::c_bSort; ///< List type: ordered (\p true) or unordered (\p false)
protected:
//@cond
typedef typename base_class::value_type node_type;
typedef typename maker::cxx_allocator cxx_allocator;
typedef typename maker::node_deallocator node_deallocator;
- typedef typename base_class::predicate_type intrusive_predicate_type;
+ typedef typename base_class::key_comparator intrusive_key_comparator;
typedef typename base_class::node_type head_type;
//@endcond
template <typename Q>
iterator find( Q const& key )
{
- return node_to_iterator( find_at( head(), key, intrusive_predicate_type() ) );
+ return node_to_iterator( find_at( head(), key, intrusive_key_comparator() ) );
}
- /// Finds the key \p val using \p pred predicate for searching
+ /// Finds the key \p val using \p pred predicate for searching (for ordered list only)
/**
The function is an analog of \ref cds_nonintrusive_LazyKVList_nogc_find "find(Q const&)"
but \p pred is used for key comparing.
\p Less functor has the interface like \p std::less.
\p pred must imply the same element order as the comparator used for building the list.
*/
- template <typename Q, typename Less, bool Sort = traits::sort>
+ template <typename Q, typename Less, bool Sort = c_bSort>
typename std::enable_if<Sort, iterator>::type find_with( Q const& key, Less pred )
{
CDS_UNUSED( pred );
return node_to_iterator( find_at( head(), key, typename maker::template less_wrapper<Less>::type() ) );
}
- /// Finds the key \p val using \p equal predicate for searching
+ /// Finds the key \p val using \p equal predicate for searching (for unordered list only)
/**
The function is an analog of \ref cds_nonintrusive_LazyKVList_nogc_find "find(Q const&)"
but \p equal is used for key comparing.
\p Equal functor has the interface like \p std::equal_to.
*/
- template <typename Q, typename Equal, bool Sort = traits::sort>
+ template <typename Q, typename Equal, bool Sort = c_bSort>
typename std::enable_if<!Sort, iterator>::type find_with( Q const& key, Equal equal )
{
CDS_UNUSED( equal );
This specialization is so-called append-only when no item
reclamation may be performed. The class does not support deleting of list item.
+ The list can be ordered if \p Traits::sort is \p true that is default
+ or unordered otherwise. Unordered list can be maintained by \p equal_to
+ relationship (\p Traits::equal_to), but for the ordered list \p less
+ or \p compare relations should be specified in \p Traits.
+
@copydetails cds_nonintrusive_LazyList_gc
*/
template <
typedef typename base_class::back_off back_off; ///< Back-off strategy used
typedef typename maker::allocator_type allocator_type; ///< Allocator type used for allocate/deallocate the nodes
typedef typename base_class::item_counter item_counter; ///< Item counting policy used
- typedef typename maker::key_comparator key_comparator; ///< key comparison functor
- typedef typename maker::equal_to_comparator equal_to_comparator; ///< key equality comparision functor
+ typedef typename maker::key_comparator key_comparator; ///< key comparing functor
typedef typename base_class::memory_model memory_model; ///< Memory ordering. See cds::opt::memory_model option
+ static CDS_CONSTEXPR bool const c_bSort = base_class::c_bSort; ///< List type: ordered (\p true) or unordered (\p false)
protected:
//@cond
typedef typename base_class::value_type node_type;
typedef typename maker::cxx_allocator cxx_allocator;
typedef typename maker::node_deallocator node_deallocator;
- typedef typename base_class::predicate_type intrusive_predicate_type;
+ typedef typename base_class::key_comparator intrusive_key_comparator;
typedef typename base_class::node_type head_type;
//@endcond
template <typename Q>
iterator find( Q const& key )
{
- return node_to_iterator( find_at( head(), key, intrusive_predicate_type() ));
+ return node_to_iterator( find_at( head(), key, intrusive_key_comparator() ));
}
- /// Finds the key \p val using \p pred predicate for searching
+ /// Finds the key \p val using \p pred predicate for searching (only for ordered list)
/**
The function is an analog of \ref cds_nonintrusive_LazyList_nogc_find "find(Q const&)"
but \p pred is used for key comparing.
\p Less functor has the interface like \p std::less.
\p pred must imply the same element order as the comparator used for building the list.
*/
- template <typename Q, typename Less, bool Sort = traits::sort>
+ template <typename Q, typename Less, bool Sort = c_bSort>
typename std::enable_if<Sort, iterator>::type find_with( Q const& key, Less pred )
{
CDS_UNUSED( pred );
return node_to_iterator( find_at( head(), key, typename maker::template less_wrapper<Less>::type() ));
}
- /// Finds the key \p val using \p equal predicate for searching
+ /// Finds the key \p val using \p equal predicate for searching (only for unordered list)
/**
The function is an analog of \ref cds_nonintrusive_LazyList_nogc_find "find(Q const&)"
but \p pred is used for key comparing.
\p Equal functor has the interface like \p std::equal_to.
*/
- template <typename Q, typename Equal, bool Sort = traits::sort>
+ template <typename Q, typename Equal, bool Sort = c_bSort>
typename std::enable_if<!Sort, iterator>::type find_with( Q const& key, Equal equal )
{
CDS_UNUSED( equal );
*/
typedef opt::none less;
- /// Specifies binary functor used for comparing keys for equality
+ /// Specifies binary functor used for comparing keys for equality (for unordered list only)
/**
If \p equal_to option is not specified, \p compare is used, if \p compare is not specified, \p less is used,
if \p less is not specified, then \p std::equal_to<T> is used.
/// Specifies list ordering policy
/**
- If \p sort is \p true, than list maintains items in sorted order, otherwise items are unordered. Default is \p true.
+ If \p sort is \p true, than list maintains items in sorted order, otherwise the list is unordered.
+ Default is \p true.
Note that if \p sort is \p false, than lookup operations scan entire list.
*/
static const bool sort = true;
} // namespace lazy_list
- /// Lazy ordered single-linked list (template specialization for \p gc::nogc)
+ /// Lazy single-linked list (template specialization for \p gc::nogc)
/** @ingroup cds_intrusive_list
\anchor cds_intrusive_LazyList_nogc
This specialization is append-only list when no item
reclamation may be performed. The class does not support deleting of list item.
+ The list can be ordered if \p Traits::sort is \p true that is default
+ or unordered otherwise. Unordered list can be maintained by \p equal_to
+ relationship (\p Traits::equal_to), but for the ordered list \p less
+ or \p compare relations should be specified in \p Traits.
+
See \ref cds_intrusive_LazyList_hp "LazyList" for description of template parameters.
*/
template <
typedef typename traits::hook hook; ///< hook type
typedef typename hook::node_type node_type; ///< node type
+ static CDS_CONSTEXPR bool const c_bSort = traits::sort; ///< List type: ordered (\p true) or unordered (\p false)
# ifdef CDS_DOXYGEN_INVOKED
- typedef implementation_defined key_comparator ; ///< key comparison functor based on opt::compare and opt::less option setter.
- typedef implementation_defined equal_to_comparator;
- typedef implementation_defined predicate_type;
+ /// Key comparing functor
+ /**
+ - for ordered list, the functor is based on \p traits::compare or \p traits::less
+ - for unordered list, the functor is based on \p traits::equal_to, \p traits::compare or \p traits::less
+ */
+ typedef implementation_defined key_comparator;
# else
- typedef typename opt::details::make_comparator< value_type, traits >::type key_comparator;
- typedef typename opt::details::make_equal_to< value_type, traits >::type equal_to_comparator;
- typedef typename std::conditional< traits::sort, key_comparator, equal_to_comparator >::type predicate_type;
+ typedef typename std::conditional< c_bSort,
+ typename opt::details::make_comparator< value_type, traits >::type,
+ typename opt::details::make_equal_to< value_type, traits >::type
+ >::type key_comparator;
# endif
typedef typename traits::back_off back_off; ///< Back-off strategy
typedef typename traits::disposer disposer; ///< disposer
typedef typename lazy_list::get_link_checker< node_type, traits::link_checker >::type link_checker; ///< link checker
typedef typename traits::item_counter item_counter; ///< Item counting policy used
- typedef typename traits::memory_model memory_model; ///< C++ memory ordering (see lazy_list::traits::memory_model)
+ typedef typename traits::memory_model memory_model; ///< C++ memory ordering (see lazy_list::traits::memory_model)
//@cond
// Rebind traits (split-list support)
template <typename Q, typename Func>
bool find( Q& key, Func f )
{
- return find_at( &m_Head, key, predicate_type(), f );
+ return find_at( &m_Head, key, key_comparator(), f );
}
//@cond
template <typename Q, typename Func>
bool find( Q const& key, Func f )
{
- return find_at( &m_Head, key, predicate_type(), f );
+ return find_at( &m_Head, key, key_comparator(), f );
}
//@endcond
\p Less functor has the interface like \p std::less.
\p pred must imply the same element order as the comparator used for building the list.
*/
- template <typename Q, typename Less, typename Func, bool Sort = traits::sort>
+ template <typename Q, typename Less, typename Func, bool Sort = c_bSort>
typename std::enable_if<Sort, bool>::type find_with( Q& key, Less less, Func f )
{
CDS_UNUSED( less );
but \p equal is used for key comparing.
\p Equal functor has the interface like \p std::equal_to.
*/
- template <typename Q, typename Equal, typename Func, bool Sort = traits::sort>
+ template <typename Q, typename Equal, typename Func, bool Sort = c_bSort>
typename std::enable_if<!Sort, bool>::type find_with( Q& key, Equal equal, Func f )
{
CDS_UNUSED( equal );
- return find_at( &m_Head, key, Equal(), f );
+ return find_at( &m_Head, key, equal, f );
}
//@cond
- template <typename Q, typename Less, typename Func, bool Sort = traits::sort>
+ template <typename Q, typename Less, typename Func, bool Sort = c_bSort>
typename std::enable_if<Sort, bool>::type find_with( Q const& key, Less pred, Func f )
{
CDS_UNUSED( pred );
return find_at( &m_Head, key, cds::opt::details::make_comparator_from_less<Less>(), f );
}
- template <typename Q, typename Equal, typename Func, bool Sort = traits::sort>
+ template <typename Q, typename Equal, typename Func, bool Sort = c_bSort>
typename std::enable_if<!Sort, bool>::type find_with( Q const& key, Equal equal, Func f )
{
CDS_UNUSED( equal );
- return find_at( &m_Head, key, Equal(), f );
+ return find_at( &m_Head, key, equal, f );
}
//@endcond
template <typename Q>
value_type * find( Q const& key )
{
- return find_at( &m_Head, key, predicate_type() );
+ return find_at( &m_Head, key, key_comparator() );
}
/// Finds the key \p key using \p pred predicate for searching. Disabled for unordered lists.
\p Less functor has the interface like \p std::less.
\p pred must imply the same element order as the comparator used for building the list.
*/
- template <typename Q, typename Less, bool Sort = traits::sort>
+ template <typename Q, typename Less, bool Sort = c_bSort>
typename std::enable_if<Sort, value_type *>::type find_with( Q const& key, Less pred )
{
CDS_UNUSED( pred );
but \p equal is used for key comparing.
\p Equal functor has the interface like \p std::equal_to.
*/
- template <typename Q, typename Equal, bool Sort = traits::sort>
+ template <typename Q, typename Equal, bool Sort = c_bSort>
typename std::enable_if<!Sort, value_type *>::type find_with( Q const& key, Equal equal )
{
- CDS_UNUSED( equal );
return find_at( &m_Head, key, equal );
}
{
link_checker::is_empty( node_traits::to_node_ptr( val ) );
position pos;
- predicate_type pred;
+ key_comparator pred;
while ( true ) {
search( pHead, val, pos, pred );
std::pair<iterator, bool> ensure_at_( node_type * pHead, value_type& val, Func func )
{
position pos;
- predicate_type pred;
+ key_comparator pred;
while ( true ) {
search( pHead, val, pos, pred );
{
auto_lock_position alp( pos );
if ( validate( pos.pPred, pos.pCur )) {
- if ( pos.pCur != &m_Tail && equal( *node_traits::to_value_ptr( *pos.pCur ), val, pred ) ) {
+ if ( pos.pCur != &m_Tail && equal( *node_traits::to_value_ptr( *pos.pCur ), val, pred )) {
// key already in the list
func( false, *node_traits::to_value_ptr( *pos.pCur ) , val );
search( pHead, val, pos, pred );
if ( pos.pCur != &m_Tail ) {
- if ( equal( *node_traits::to_value_ptr( *pos.pCur ), val, pred ) )
+ if ( equal( *node_traits::to_value_ptr( *pos.pCur ), val, pred ))
return iterator( pos.pCur );
}
return end();
protected:
//@cond
- template <typename Q, typename Equal, bool Sort = traits::sort>
+ template <typename Q, typename Equal, bool Sort = c_bSort>
typename std::enable_if<!Sort, void>::type search( node_type * pHead, const Q& key, position& pos, Equal eq )
{
const node_type * pTail = &m_Tail;
pos.pPred = pPrev;
}
- template <typename Q, typename Compare, bool Sort = traits::sort>
+ template <typename Q, typename Compare, bool Sort = c_bSort>
typename std::enable_if<Sort, void>::type search( node_type * pHead, const Q& key, position& pos, Compare cmp )
{
const node_type * pTail = &m_Tail;
pos.pPred = pPrev;
}
- template <typename L, typename R, typename Equal, bool Sort = traits::sort>
+ template <typename L, typename R, typename Equal, bool Sort = c_bSort>
static typename std::enable_if<!Sort, bool>::type equal( L const& l, R const& r, Equal eq )
{
return eq(l, r);
}
- template <typename L, typename R, typename Compare, bool Sort = traits::sort>
+ template <typename L, typename R, typename Compare, bool Sort = c_bSort>
static typename std::enable_if<Sort, bool>::type equal( L const& l, R const& r, Compare cmp )
{
return cmp(l, r) == 0;
template <typename T, typename Q>
bool operator()( T const& t, Q const& q ) const
{
- compare_functor cmp;
- return cmp(t, q) == 0;
+ return compare_functor()(t, q) == 0;
}
};
opt::none >::type,
make_equal_to_from_less< less > >::type,
make_equal_to_from_compare< compare > >::type,
- equal_to >::type type;
+ equal_to
+ >::type type;
};
}
//@endcond
}
};
+ template <typename T>
+ struct equal {
+ bool operator ()(const T& v1, const T& v2 ) const
+ {
+ return v1.key() == v2.key();
+ }
+
+ template <typename Q>
+ bool operator ()(const T& v1, const Q& v2 ) const
+ {
+ return v1.key() == v2;
+ }
+
+ template <typename Q>
+ bool operator ()(const Q& v1, const T& v2 ) const
+ {
+ return v1 == v2.key();
+ }
+ };
+
struct other_item {
int nKey;
}
};
+ struct other_equal {
+ template <typename T, typename Q>
+ bool operator()( T const& i1, Q const& i2) const
+ {
+ return i1.nKey == i2.nKey;
+ }
+ };
+
struct faked_disposer
{
template <typename T>
void test_nogc_int()
{
typedef typename OrdList::value_type value_type;
+ typedef typename std::conditional< OrdList::c_bSort, less<value_type>, equal<value_type>>::type find_predicate;
+
{
value_type v1( 10, 50 );
value_type v2( 5, 25 );
CPPUNIT_ASSERT( l.find( v1.key(), find_functor() ));
CPPUNIT_ASSERT( v1.s.nFindCall == 1 );
- CPPUNIT_ASSERT( l.find_with( v2.key(), less<value_type>() ) == nullptr );
+ CPPUNIT_ASSERT( l.find_with( v2.key(), find_predicate() ) == nullptr );
CPPUNIT_ASSERT( l.find( v3.key() ) == nullptr );
CPPUNIT_ASSERT( !l.empty() );
CPPUNIT_ASSERT( l.find( v1.key(), find_functor() ));
CPPUNIT_ASSERT( v1.s.nFindCall == 2 );
- CPPUNIT_ASSERT( l.find_with( v2.key(), less<value_type>() ) == &v2 );
+ CPPUNIT_ASSERT( l.find_with( v2.key(), find_predicate() ) == &v2 );
CPPUNIT_ASSERT( v2.s.nFindCall == 0 );
- CPPUNIT_ASSERT( l.find_with( v2.key(), less<value_type>(), find_functor() ));
+ CPPUNIT_ASSERT( l.find_with( v2.key(), find_predicate(), find_functor() ));
CPPUNIT_ASSERT( v2.s.nFindCall == 1 );
CPPUNIT_ASSERT( !l.find( v3.key() ));
void nogc_member_less();
void nogc_member_cmpmix();
void nogc_member_ic();
+ void nogc_base_unord_equal();
+ void nogc_base_unord_cmp();
+ void nogc_base_unord_less();
+ void nogc_member_unord_equal();
+ void nogc_member_unord_cmp();
+ void nogc_member_unord_less();
CPPUNIT_TEST_SUITE(IntrusiveLazyListHeaderTest)
CPPUNIT_TEST(nogc_base_less)
CPPUNIT_TEST(nogc_base_cmpmix)
CPPUNIT_TEST(nogc_base_ic)
+ CPPUNIT_TEST(nogc_base_unord_equal)
+ CPPUNIT_TEST(nogc_base_unord_cmp)
+ CPPUNIT_TEST(nogc_base_unord_less)
CPPUNIT_TEST(nogc_member_cmp)
CPPUNIT_TEST(nogc_member_less)
CPPUNIT_TEST(nogc_member_cmpmix)
CPPUNIT_TEST(nogc_member_ic)
+ CPPUNIT_TEST(nogc_member_unord_equal)
+ CPPUNIT_TEST(nogc_member_unord_cmp)
+ CPPUNIT_TEST(nogc_member_unord_less)
CPPUNIT_TEST_SUITE_END()
};
typedef ci::LazyList< cds::gc::nogc, item, traits > list;
test_nogc_int<list>();
}
+
void IntrusiveLazyListHeaderTest::nogc_base_less()
{
typedef base_int_item< cds::gc::nogc > item;
typedef ci::LazyList< cds::gc::nogc, item, traits > list;
test_nogc_int<list>();
}
+
void IntrusiveLazyListHeaderTest::nogc_base_cmpmix()
{
typedef base_int_item< cds::gc::nogc > item;
> list;
test_nogc_int<list>();
}
+
void IntrusiveLazyListHeaderTest::nogc_base_ic()
{
typedef base_int_item< cds::gc::nogc > item;
> list;
test_nogc_int<list>();
}
+
+ void IntrusiveLazyListHeaderTest::nogc_base_unord_equal()
+ {
+ typedef base_int_item< cds::gc::nogc > item;
+ struct traits: public
+ ci::lazy_list::make_traits<
+ ci::opt::hook< ci::lazy_list::base_hook< co::gc<cds::gc::nogc> > >
+ ,co::sort< false >
+ ,co::equal_to< equal<item> >
+ ,ci::opt::disposer< faked_disposer >
+ >::type
+ {};
+ typedef ci::LazyList< cds::gc::nogc, item, traits > list;
+ test_nogc_int<list>();
+ }
+
+ void IntrusiveLazyListHeaderTest::nogc_base_unord_cmp()
+ {
+ typedef base_int_item< cds::gc::nogc > item;
+ struct traits: public
+ ci::lazy_list::make_traits<
+ ci::opt::hook< ci::lazy_list::base_hook< co::gc<cds::gc::nogc> > >
+ ,co::sort< false >
+ ,co::compare< cmp<item> >
+ ,ci::opt::disposer< faked_disposer >
+ >::type
+ {};
+ typedef ci::LazyList< cds::gc::nogc, item, traits > list;
+ test_nogc_int<list>();
+ }
+
+ void IntrusiveLazyListHeaderTest::nogc_base_unord_less()
+ {
+ typedef base_int_item< cds::gc::nogc > item;
+ struct traits: public
+ ci::lazy_list::make_traits<
+ ci::opt::hook< ci::lazy_list::base_hook< co::gc<cds::gc::nogc> > >
+ ,co::sort< false >
+ ,co::less< less<item> >
+ ,ci::opt::disposer< faked_disposer >
+ >::type
+ {};
+ typedef ci::LazyList< cds::gc::nogc, item, traits > list;
+ test_nogc_int<list>();
+ }
+
void IntrusiveLazyListHeaderTest::nogc_member_cmp()
{
typedef member_int_item< cds::gc::nogc > item;
> list;
test_nogc_int<list>();
}
+
void IntrusiveLazyListHeaderTest::nogc_member_less()
{
typedef member_int_item< cds::gc::nogc > item;
> list;
test_nogc_int<list>();
}
+
void IntrusiveLazyListHeaderTest::nogc_member_cmpmix()
{
typedef member_int_item< cds::gc::nogc > item;
> list;
test_nogc_int<list>();
}
+
void IntrusiveLazyListHeaderTest::nogc_member_ic()
{
typedef member_int_item< cds::gc::nogc > item;
test_nogc_int<list>();
}
+ void IntrusiveLazyListHeaderTest::nogc_member_unord_equal()
+ {
+ typedef member_int_item< cds::gc::nogc > item;
+ typedef ci::LazyList< cds::gc::nogc
+ ,item
+ ,ci::lazy_list::make_traits<
+ ci::opt::hook< ci::lazy_list::member_hook<
+ offsetof( item, hMember ),
+ co::gc<cds::gc::nogc>
+ > >
+ ,co::sort< false >
+ ,co::equal_to< equal<item> >
+ ,ci::opt::disposer< faked_disposer >
+ >::type
+ > list;
+ test_nogc_int<list>();
+ }
+
+ void IntrusiveLazyListHeaderTest::nogc_member_unord_cmp()
+ {
+ typedef member_int_item< cds::gc::nogc > item;
+ typedef ci::LazyList< cds::gc::nogc
+ ,item
+ ,ci::lazy_list::make_traits<
+ ci::opt::hook< ci::lazy_list::member_hook<
+ offsetof( item, hMember ),
+ co::gc<cds::gc::nogc>
+ > >
+ ,co::sort< false >
+ ,co::compare< cmp<item> >
+ ,ci::opt::disposer< faked_disposer >
+ >::type
+ > list;
+ test_nogc_int<list>();
+ }
+
+ void IntrusiveLazyListHeaderTest::nogc_member_unord_less()
+ {
+ typedef member_int_item< cds::gc::nogc > item;
+ typedef ci::LazyList< cds::gc::nogc
+ ,item
+ ,ci::lazy_list::make_traits<
+ ci::opt::hook< ci::lazy_list::member_hook<
+ offsetof( item, hMember ),
+ co::gc<cds::gc::nogc>
+ > >
+ ,co::sort< false >
+ ,co::less< less<item> >
+ ,ci::opt::disposer< faked_disposer >
+ >::type
+ > list;
+ test_nogc_int<list>();
+ }
+
} // namespace ordlist