Namespaces
Variants
Views
Actions

std::queue::back

From cppreference.com
< cpp‎ | container‎ | queue
Revision as of 12:33, 2 November 2012 by P12bot (Talk | contribs)

Template:ddcl list begin <tr class="t-dcl-sep"><td></td><td></td><td></td></tr>

<tr class="t-dcl ">

<td class="t-dcl-nopad">
reference back();
</td>

<td class="t-dcl-nopad"> </td> <td class="t-dcl-nopad"> </td> </tr> <tr class="t-dcl-sep"><td></td><td></td><td></td></tr>

<tr class="t-dcl ">

<td class="t-dcl-nopad">
const_reference back() const;
</td>

<td class="t-dcl-nopad"> </td> <td class="t-dcl-nopad"> </td> </tr> Template:ddcl list end

Returns reference to the last element in the queue. This is the most recently pushed element. Effectively calls c.back().

Contents

Parameters

(none)

Return value

reference to the last element

Complexity

Constant

See also

Template:cpp/container/dcl list frontTemplate:cpp/container/dcl list push