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

  1. リファレンス
  2. node_handle
  3. node_handle
  4. empty

最終更新日時: 2026年09月11日 13時06分31秒 (JST)
Akira Takahashi が更新

履歴 編集

function

::node_handle::empty(C++17)

bool empty() const noexcept;               // (1) C++17
[[nodiscard]] bool empty() const noexcept; // (1) C++20
constexpr bool empty() const noexcept;     // (1) C++26

概要

ノードハンドルが空であれば true、そうでなければ false を返す。

例

#include <iostream>
#include <set>

int main()
{
  std::set<int>::node_type nh;
  std::cout << std::boolalpha << nh.empty();
}

出力

true

バージョン

言語

  • C++17

処理系

  • Clang: 7.0.0 ✅
  • GCC: 7.1.0 ✅
  • Visual C++: 2017 Update 5 ✅

参照

  • Splicing Maps and Sets(Revision 5)
  • P0600R1 [[nodiscard]] in the Library
    • C++20で[[nodiscard]]が付加された
  • P2422R1 Remove nodiscard annotations from the standard library specification
    • C++26で[[nodiscard]]指定が削除された
  • P3372R3 constexpr containers and adaptors
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.