Removes the next element from the queue \p val takes a copy of the element */
| 213 | \p val takes a copy of the element |
| 214 | */ |
| 215 | bool dequeue( value_type& val ) |
| 216 | { |
| 217 | auto pRec = m_FlatCombining.acquire_record(); |
| 218 | pRec->pValDeq = &val; |
| 219 | |
| 220 | constexpr_if ( c_bEliminationEnabled ) |
| 221 | m_FlatCombining.batch_combine( op_deq, pRec, *this ); |
| 222 | else |
| 223 | m_FlatCombining.combine( op_deq, pRec, *this ); |
| 224 | |
| 225 | assert( pRec->is_done()); |
| 226 | m_FlatCombining.release_record( pRec ); |
| 227 | |
| 228 | m_FlatCombining.internal_statistics().onDequeue( pRec->bEmpty ); |
| 229 | return !pRec->bEmpty; |
| 230 | } |
| 231 | |
| 232 | /// Removes the next element from the queue (a synonym for \ref dequeue) |
| 233 | bool pop( value_type& val ) |