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

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

最終更新日時: 2026年07月22日 16時08分23秒 (JST)
rotarymars が更新

履歴 編集

function
<stacktrace>

std::stacktrace_entry::to_string(C++23)

namespace std {
  string to_string(const stacktrace_entry& f);
}

概要

文字列化する。

戻り値

fのスタックトレースエントリ情報を説明する文字列を返す。

備考

  • 実装への推奨として、説明文字列は、f.source_file()およびf.source_line()の評価を含む情報を提供すべきである

例

#include <iostream>
#include <stacktrace>
#include <string>

void g() {
  std::string entry = std::to_string(std::stacktrace::current()[0]);
  std::cout << entry << std::endl;
}

void f() {
  g();
}

int main() {
  f();
}

出力例 (GCC)

 g() at /app/example.cpp:5

バージョン

言語

  • 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.