}
// The queue is full
CPPUNIT_CHECK( !q.empty() );
- CPPUNIT_ASSERT( !q.push_with( [nCapacity]( int& itm ) { itm = nCapacity; } ) );
+ CPPUNIT_ASSERT( !q.push_with( [nCapacity]( int& itm ) { itm = static_cast<int>(nCapacity); } ) );
int n = -1;
CPPUNIT_CHECK( q.pop(n) );
CPPUNIT_CHECK( n == 0 );
- CPPUNIT_ASSERT( q.push( nCapacity ) );
- CPPUNIT_ASSERT( !q.push( nCapacity ) );
+ CPPUNIT_ASSERT( q.push( static_cast<it>(nCapacity) ) );
+ CPPUNIT_ASSERT( !q.push( static_cast<it>(nCapacity) ) );
}
template <class Queue>
// The queue is full
CPPUNIT_CHECK( !q.empty() );
CPPUNIT_CHECK( q.size() == nCapacity );
- CPPUNIT_ASSERT( !q.push_with( [nCapacity]( int& itm ) { itm = nCapacity; } ) );
+ CPPUNIT_ASSERT( !q.push_with( [nCapacity]( int& itm ) { itm = static_cast<it>(nCapacity); } ) );
int n = -1;
CPPUNIT_CHECK( q.pop( n ) );
CPPUNIT_CHECK( n == 0 );
- CPPUNIT_ASSERT( q.push( nCapacity ) );
+ CPPUNIT_ASSERT( q.push( static_cast<it>(nCapacity) ) );
CPPUNIT_CHECK( q.size() == nCapacity );
- CPPUNIT_ASSERT( !q.push( nCapacity ) );
+ CPPUNIT_ASSERT( !q.push( static_cast<it>(nCapacity) ) );
CPPUNIT_CHECK( q.size() == nCapacity );
}
{
struct queue_traits : public cds::container::tsigas_queue::traits
{
+ typedef cds::opt::v::static_buffer< int, 1024 > buffer;
typedef cds::atomicity::item_counter item_counter;
};
typedef cds::container::TsigasCycleQueue< int, queue_traits > queue_type;