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 — hive - cpprefjp C++日本語リファレンス

  1. リファレンス
  2. hive

最終更新日時: 2026年07月29日 11時07分26秒 (JST)
Akira Takahashi が更新

履歴 編集

<hive>

hive(C++26)

<hive>ヘッダでは、要素のメモリ位置が安定したシーケンスコンテナであるhiveを提供する。

hiveは、要素の挿入・削除を定数時間で行いつつ、削除されなかった要素のポインタ・参照・イテレータを無効化しないコンテナである。要素は複数のメモリブロック(要素ブロック)に格納され、削除された要素の位置はスキップされる。挿入位置はコンテナが決定するため、要素の順序は指定できない。

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

  • <initializer_list> (C++11)
  • <compare> (C++20)
名前 説明 対応バージョン
hive 要素のメモリ位置が安定したシーケンスコンテナ (class template) C++26
hive_limits 要素ブロックの容量の下限・上限を指定する構造体 (class) C++26
swap 2つのhiveオブジェクトを入れ替える (function template) C++26
erase 指定した値の要素を削除する (function template) C++26
erase_if 条件を満たす要素を削除する (function template) C++26

std::pmr名前空間には、以下の型の別名が定義される。

名前 説明 対応バージョン
pmr::hive アロケータとしてpmr::polymorphic_allocatorを使用するhiveの別名 (alias template) C++26

バージョン

言語

  • C++26

処理系

  • Clang: 22 ❌
  • GCC: 16.1 ❌
  • Visual C++: 2026 Update 2 ❌

関連項目

  • std::list
  • std::deque

参照

  • P0447R28 Introduction of std::hive to the standard library
    • C++26で<hive>ヘッダが追加された
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.