GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • cpprefjp - C++日本語リファレンス
  • GitHub Project

This view

  • Original page
  • New address

GeezerVison is showing cpprefjp.github.io — stack - cpprefjp C++日本語リファレンス

  1. リファレンス
  2. stack

最終更新日時: 2020年11月19日 14時42分25秒 (JST)
Akira Takahashi が更新

履歴 編集

<stack>

stack

stack はコンテナアダプタであり、LIFO (last-in first-out) の動作――コンテナの一方から要素が挿入され、挿入された側から要素を取り出す――を実現する目的で設計されている。要素をコンテナの back() 側から挿入し、同じく back() 側から取り出す。

stack は、所定のメンバ関数を持つコンテナのオブジェクトを内部実装として用いており、標準のコンテナ、もしくは独自に実装したコンテナを指定することができる。 このコンテナに必要な要件は、以下のメンバ関数を持つことである。

  • back()
  • push_back()
  • pop_back()
  • emplace_back() (C++11)

この要件を満たすものとしては vector 、deque 、list があり、デフォルトでは deque が使用される。

このヘッダでは、以下の標準ヘッダをインクルードする:

  • <initializer_list> (C++11)
  • <compare> (C++20)
名前 説明 対応バージョン
stack LIFOスタック(class template)

参照

  • N2930 Range-Based For Loop Wording (Without Concepts)
  • P2051R0 C++ Standard Library Issues to be moved in Prague
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.