-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStacktrace.cpp
More file actions
37 lines (28 loc) · 798 Bytes
/
Stacktrace.cpp
File metadata and controls
37 lines (28 loc) · 798 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/**
* \file Stacktrace.cpp
* \brief boost::stacktrace
*/
#include <StdStream/StdStream.h>
#include <StdTest/StdTest.h>
#include <Stl.h>
#if __has_include(<boost/version.hpp>)
#include <boost/version.hpp>
#endif
#if (BOOST_VERSION > 0)
#define BOOST_STACKTRACE_USE_ADDR2LINE 1
#include <boost/stacktrace.hpp>
#endif
//-------------------------------------------------------------------------------------------------
int main(int , char **)
{
#if (BOOST_VERSION > 0)
const auto &aRv = boost::stacktrace::stacktrace();
std::cout << aRv.as_vector() << std::endl;
#else
std::cout << "Boost - not instaled, skip" << std::endl;
#endif
return EXIT_SUCCESS;
}
//-------------------------------------------------------------------------------------------------
#if OUTPUT
#endif