File indexing completed on 2025-04-26 08:54:26
0001
0002
0003
0004
0005
0006
0007 #ifndef BOOST_STACKTRACE_THIS_THREAD_HPP
0008 #define BOOST_STACKTRACE_THIS_THREAD_HPP
0009
0010 #include <boost/config.hpp>
0011 #ifdef BOOST_HAS_PRAGMA_ONCE
0012 # pragma once
0013 #endif
0014
0015 #include <boost/stacktrace/stacktrace.hpp>
0016
0017 namespace boost { namespace stacktrace { namespace this_thread {
0018
0019
0020
0021
0022
0023
0024
0025 inline void set_capture_stacktraces_at_throw(bool enable = true) noexcept {
0026 #if defined(__GNUC__) && defined(__ELF__)
0027 if (impl::ref_capture_stacktraces_at_throw) {
0028 impl::ref_capture_stacktraces_at_throw() = enable;
0029 }
0030 #elif defined(BOOST_MSVC)
0031 if (bool* p = boost_stacktrace_impl_ref_capture_stacktraces_at_throw()) {
0032 *p = enable;
0033 }
0034 #endif
0035 (void)enable;
0036 }
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047 inline bool get_capture_stacktraces_at_throw() noexcept {
0048 #if defined(__GNUC__) && defined(__ELF__)
0049 if (impl::ref_capture_stacktraces_at_throw) {
0050 return impl::ref_capture_stacktraces_at_throw();
0051 }
0052 #elif defined(BOOST_MSVC)
0053 if (bool* p = boost_stacktrace_impl_ref_capture_stacktraces_at_throw()) {
0054 return *p;
0055 }
0056 #endif
0057 return false;
0058 }
0059
0060 }}}
0061
0062 #endif