- typedef GC gc;
- typedef T value_type;
-
- struct default_options {
- typedef cds::backoff::empty back_off;
- typedef CDS_DEFAULT_ALLOCATOR allocator;
- typedef atomicity::empty_item_counter item_counter;
- typedef intrusive::queue_dummy_stat stat;
- typedef opt::v::relaxed_ordering memory_model;
- enum { alignment = opt::cache_line_alignment };
- };
-
- typedef typename opt::make_options<
- typename cds::opt::find_type_traits< default_options, CDS_OPTIONS7 >::type
- ,CDS_OPTIONS7
- >::type options;
-
- struct node_type: public intrusive::single_link::node< gc >
- {
- value_type m_value;
-
- node_type( const value_type& val )
- : m_value( val )
- {}
-# ifdef CDS_EMPLACE_SUPPORT
- template <typename... Args>
- node_type( Args&&... args )
- : m_value( std::forward<Args>(args)...)
- {}
-# else
- node_type()
- {}
-# endif
- };
-
- typedef typename options::allocator::template rebind<node_type>::other allocator_type;
- typedef cds::details::Allocator< node_type, allocator_type > cxx_allocator;
-
- struct node_deallocator
- {
- void operator ()( node_type * pNode )
- {
- cxx_allocator().Delete( pNode );
- }
- };
-
- typedef intrusive::MoirQueue<
- gc
- ,node_type
- ,intrusive::opt::hook<
- intrusive::single_link::base_hook< opt::gc<gc> >
- >
- ,opt::back_off< typename options::back_off >
- ,intrusive::opt::disposer< node_deallocator >
- ,opt::item_counter< typename options::item_counter >
- ,opt::stat< typename options::stat >
- ,opt::alignment< options::alignment >
- ,opt::memory_model< typename options::memory_model >
- > type;