Checks if the queue is empty
| 557 | |
| 558 | /// Checks if the queue is empty |
| 559 | bool empty() const |
| 560 | { |
| 561 | typename gc::Guard guard; |
| 562 | node_type * p = guard.protect( m_pHead, []( node_type * pNode ) -> value_type * { return node_traits::to_value_ptr( pNode );}); |
| 563 | return p->m_pNext.load( memory_model::memory_order_relaxed ) == nullptr; |
| 564 | } |
| 565 | |
| 566 | /// Clear the queue |
| 567 | /** |