Files
stacktrace/test/cmake_install_test/main.cpp
2026-01-04 11:21:08 +03:00

19 lines
494 B
C++

// Copyright 2019 Peter Dimov
// Copyright Antony Polukhin, 2025-2026
//
// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt
#include <boost/stacktrace/stacktrace.hpp>
#include <iostream>
int main()
{
std::cout << boost::stacktrace::stacktrace() << std::endl;
try {
throw 42;
} catch (...) {
std::cout << "From current excption:\n" << boost::stacktrace::stacktrace::from_current_exception() << std::endl;
}
}