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 — std::stacktrace_entry::operator== - cpprefjp C++日本語リファレンス

  1. リファレンス
  2. stacktrace
  3. stacktrace_entry
  4. operator==

最終更新日時: 2024年06月11日 22時45分38秒 (JST)
Akira Takahashi が更新

履歴 編集

function
<stacktrace>

std::stacktrace_entry::operator==(C++23)

friend bool operator==(const stacktrace_entry& x,
                       const stacktrace_entry& y) noexcept;

概要

stacktrace_entry同士の等値比較を行う。

戻り値

xとyが同じスタックトレースエントリを表すか、両方が空の場合のみtrueを返す。

備考

  • この演算子により、operator!=が使用可能になる

例

#include <cassert>
#include <stacktrace>

void g() {
  std::stacktrace st = std::stacktrace::current();
  std::stacktrace_entry a = st[0];
  std::stacktrace_entry b = st[0];
  std::stacktrace_entry c = st[1];

  assert(a == b);
  assert(a != c);
}

void f() {
  g();
}

int main() {
  f();
}

出力

バージョン

言語

  • C++23

処理系

  • Clang: ??
  • GCC: 12 ✅
  • Visual C++: ??

関連項目

  • Hidden Friends
You are visitor 01402520 — 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.