##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# std::stack::empty

From cppreference.com
< cpp‎ | container‎ | stack

[edit template]

bool empty() const; |  |

Checks if the underlying container has no elements, i.e. whether c.empty().

### [edit] Parameters

(none)

### [edit] Return value

true if the underlying container is empty, false otherwise

### [edit] Complexity

Constant

### [edit] See also

size | returns the number of elements (public member function) [edit]

Retrieved from "http://en.cppreference.com/mwiki/index.php?title=cpp/container/stack/empty&oldid=50669"