Boost C++ Libraries: Ticket #11444: BOOST_CHECK triggers debug assertion on VS C++ 2015 RC when called from within lambda https://svn.boost.org/trac10/ticket/11444 <p> I have been trying to use boost tests on with VS C++ 2015 in conjunction with boost asio and a few lambdas. It seems like there is a problem with calling BOOST_CHECK from within a lambda that has previously been dispatched via boost::asio. The calls always look like this: </p> <pre class="wiki">BOOST_CHECK(foo([] {BOOST_CHECK(false);}); </pre><p> where foo dispatches the lambda some time (depending on network transfers) after the call to foo. </p> <p> This is an example stack trace for such an assertion: </p> <pre class="wiki"> msvcp140d.dll!std::_Debug_message(const wchar_t * message, const wchar_t * file, unsigned int line) Zeile 17 C++ &gt; test_modbus.exe!std::_String_const_iterator&lt;std::_String_val&lt;std::_Simple_types&lt;char&gt; &gt; &gt;::operator+=(int _Off) Zeile 164 C++ test_modbus.exe!std::_String_iterator&lt;std::_String_val&lt;std::_Simple_types&lt;char&gt; &gt; &gt;::operator+=(int _Off) Zeile 369 C++ test_modbus.exe!std::_String_iterator&lt;std::_String_val&lt;std::_Simple_types&lt;char&gt; &gt; &gt;::operator+(int _Off) Zeile 375 C++ test_modbus.exe!std::_Transform1&lt;char *,std::_String_iterator&lt;std::_String_val&lt;std::_Simple_types&lt;char&gt; &gt; &gt;,char (__cdecl*)(char)&gt;(char * _First, char * _Last, std::_String_iterator&lt;std::_String_val&lt;std::_Simple_types&lt;char&gt; &gt; &gt; _Dest, char (char) * _Func, std::random_access_iterator_tag __formal, std::random_access_iterator_tag __formal) Zeile 1049 C++ test_modbus.exe!std::_Transform1&lt;char *,std::_String_iterator&lt;std::_String_val&lt;std::_Simple_types&lt;char&gt; &gt; &gt;,char (__cdecl*)(char)&gt;(char * _First, char * _Last, std::_String_iterator&lt;std::_String_val&lt;std::_Simple_types&lt;char&gt; &gt; &gt; _Dest, char (char) * _Func, std::integral_constant&lt;bool,1&gt; __formal) Zeile 1061 C++ test_modbus.exe!std::transform&lt;std::_String_iterator&lt;std::_String_val&lt;std::_Simple_types&lt;char&gt; &gt; &gt;,std::_String_iterator&lt;std::_String_val&lt;std::_Simple_types&lt;char&gt; &gt; &gt;,char (__cdecl*)(char)&gt;(std::_String_iterator&lt;std::_String_val&lt;std::_Simple_types&lt;char&gt; &gt; &gt; _First, std::_String_iterator&lt;std::_String_val&lt;std::_Simple_types&lt;char&gt; &gt; &gt; _Last, std::_String_iterator&lt;std::_String_val&lt;std::_Simple_types&lt;char&gt; &gt; &gt; _Dest, char (char) * _Func) Zeile 1086 C++ test_modbus.exe!boost::unit_test::unit_test_log_t::operator&lt;&lt;(const boost::unit_test::log::begin &amp; b) Zeile 271 C++ test_modbus.exe!boost::test_tools::tt_detail::check_impl(const boost::test_tools::predicate_result &amp; pr, const boost::unit_test::lazy_ostream &amp; check_descr, boost::unit_test::basic_cstring&lt;char const &gt; file_name, unsigned int line_num, boost::test_tools::tt_detail::tool_level tl, boost::test_tools::tt_detail::check_type ct, unsigned int num_of_args, ...) Zeile 162 C++ test_modbus.exe!channel_modbus_client::parallel_write::test_method::__l10::&lt;lambda&gt;() Zeile 378 C++ </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/11444 Trac 1.4.3 Gennadiy Rozental Tue, 07 Jul 2015 22:42:05 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/11444#comment:1 https://svn.boost.org/trac10/ticket/11444#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">duplicate</span> </li> </ul> Ticket