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

  1. リファレンス
  2. stacktrace
  3. basic_stacktrace
  4. end

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

履歴 編集

function
<stacktrace>

std::basic_stacktrace::end(C++23)

const_iterator end() const noexcept; // (1) C++23

概要

末尾の次を指すイテレータを取得する。

戻り値

スタックトレース履歴の末尾の次を指すイテレータを返す。

例

#include <iostream>
#include <stacktrace>
#include <algorithm>

void g() {
  std::stacktrace st = std::stacktrace::current();
  std::for_each(st.begin(), st.end(), [](const std::stacktrace_entry& x) {
    std::cout << x << std::endl;
  });
}

void f() {
  g();
}

int main() {
  f();
}

出力例 (GCC)

 g() at /app/example.cpp:6
 f() at /app/example.cpp:13
main at /app/example.cpp:17
     at :0
__libc_start_main at :0
_start at :0

バージョン

言語

  • C++23

処理系

  • Clang: ??
  • GCC: 12 ✅
  • Visual C++: ??
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.