Sources Pipelines Documentation

Allocators  
backtrace.hpp
1 #pragma once
2 
3 #include <iostream>
4 #include <string>
5 #include <vector>
6 
7 
8 namespace boost { namespace utils {
9 
18 class backtrace
19 {
20 public:
21  backtrace();
22  ~backtrace();
23 
24  static void *operator new (size_t) = delete;
25  static void *operator new[] (size_t) = delete;
26  static void operator delete (void*) = delete;
27  static void operator delete[](void*) = delete;
28 
29  void dump(std::ostream& os) const;
30 
31 private:
32  static const std::size_t BT_BUF_SIZE = 100ul;
33 
34  void* buffer_[BT_BUF_SIZE];
35  std::uint64_t nptrs_;
36  char** locations_;
37 };
38 
39 } }
40 
41 std::ostream& operator<<(std::ostream& os, const boost::utils::backtrace& bt);
42 
43 #include "backtrace.ipp"
44 
Produces a backtrace of RAII.
Definition: backtrace.hpp:18