]>
Commit | Line | Data |
---|---|---|
f67539c2 | 1 | // Copyright Antony Polukhin, 2016-2020. |
b32b8144 FG |
2 | // |
3 | // Distributed under the Boost Software License, Version 1.0. (See | |
4 | // accompanying file LICENSE_1_0.txt or copy at | |
5 | // http://www.boost.org/LICENSE_1_0.txt) | |
6 | ||
7 | #include <boost/config.hpp> | |
8 | ||
9 | #include <string> | |
10 | #include <cstring> | |
11 | #include <windows.h> | |
12 | #include "dbgeng.h" | |
13 | ||
14 | #ifdef BOOST_NO_CXX11_THREAD_LOCAL | |
15 | # error Your compiler does not support C++11 thread_local storage. It`s impossible to build with BOOST_STACKTRACE_USE_WINDBG_CACHED. | |
16 | #endif | |
17 | ||
18 | int foo() { | |
19 | static thread_local std::string i = std::string(); | |
20 | ||
11fdf7f2 | 21 | return static_cast<int>(i.size()); |
b32b8144 FG |
22 | } |
23 | ||
24 | int main() { | |
25 | ::CoInitializeEx(0, COINIT_MULTITHREADED); | |
26 | ||
27 | return foo(); | |
28 | } |