From 9fc256bee46713423f86337a4eac066a2fc30b27 Mon Sep 17 00:00:00 2001 From: Antony Polukhin Date: Sat, 15 Apr 2017 14:56:21 +0300 Subject: [PATCH] Fixes for cached msvc compilation --- include/boost/stacktrace/detail/frame_msvc.ipp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/include/boost/stacktrace/detail/frame_msvc.ipp b/include/boost/stacktrace/detail/frame_msvc.ipp index ac1050f..6631135 100644 --- a/include/boost/stacktrace/detail/frame_msvc.ipp +++ b/include/boost/stacktrace/detail/frame_msvc.ipp @@ -177,11 +177,7 @@ public: #else - com_holder< ::IDebugSymbols>* idebug_; -public: - debugging_symbols() BOOST_NOEXCEPT - : idebug_(0) - { + static com_holder< ::IDebugSymbols>& get_thread_local_debug_inst() BOOST_NOEXCEPT { // [class.mfct]: A static local variable or local type in a member function always refers to the same entity, whether // or not the member function is inline. static thread_local boost::stacktrace::detail::com_global_initer com; @@ -191,9 +187,15 @@ public: try_init_com(idebug, com); } - idebug_ = &idebug; + return idebug; } + com_holder< ::IDebugSymbols>& idebug_; +public: + debugging_symbols() BOOST_NOEXCEPT + : idebug_( get_thread_local_debug_inst() ) + {} + #endif // #ifndef BOOST_STACKTRACE_USE_WINDBG_CACHED bool is_inited() const BOOST_NOEXCEPT {