Boost logo

Boost :

Subject: [boost] [ASIO] 1.70.0 async_read_until reports undefined symbol with MSVS 2010
From: Kenneth Porter (shiva_at_[hidden])
Date: 2019-04-14 17:22:19

The following test code (inside #if 1) generates a LNK2019 (unresolved
external symbol) with 1.70.0 but links successfully with 1.69.0. Inspecting
read_until.hpp, I suspect the problem is with the enable_if expansion being
too complex for the older compiler. (Hence the #if0 code which tests the
individual conditions, but those seem to work fine.) The same code links
with VS2019 and VS2015, and this linked under the previous Boost with

int _tmain(int argc, _TCHAR* argv[])
   typedef boost::asio::streambuf buftype;
#if 0
   const bool v1 = boost::asio::is_dynamic_buffer_v1<typename
   const bool notv2 = !boost::asio::is_dynamic_buffer_v2<typename
#if 0
   void* cond = boost::enable_if<
                && !boost::asio::is_dynamic_buffer_v2<typename
>::type* 0;
#if 1
   boost::asio::io_service ios;
   boost::asio::ip::tcp::socket socket(ios);
   boost::asio::streambuf buf;
   boost::asio::async_read_until(socket, buf, '\n', NULL);
   return 0;

Boost list run by bdawes at, gregod at, cpdaniel at, john at