MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / push_front

Function push_front

extern/libcds/cds/container/fcdeque.h:174–190  ·  view source on GitHub ↗

Inserts a new element at the beginning of the deque container The function always returns \p true */

Source from the content-addressed store, hash-verified

172 The function always returns \p true
173 */
174 bool push_front(
175 value_type const& val ///< Value to be copied to inserted element
176 )
177 {
178 auto pRec = m_FlatCombining.acquire_record();
179 pRec->pValPush = &val;
180
181 constexpr_if ( c_bEliminationEnabled )
182 m_FlatCombining.batch_combine( op_push_front, pRec, *this );
183 else
184 m_FlatCombining.combine( op_push_front, pRec, *this );
185
186 assert( pRec->is_done());
187 m_FlatCombining.release_record( pRec );
188 m_FlatCombining.internal_statistics().onPushFront();
189 return true;
190 }
191
192 /// Inserts a new element at the beginning of the deque container (move semantics)
193 /**

Callers 2

pushMethod · 0.50
pushMethod · 0.50

Calls 7

assertClass · 0.85
acquire_recordMethod · 0.80
batch_combineMethod · 0.80
release_recordMethod · 0.80
is_doneMethod · 0.45
onPushFrontMethod · 0.45
onPushFrontMoveMethod · 0.45

Tested by 2

pushMethod · 0.40
pushMethod · 0.40