title: Compilation errors when building Boost Beast example websocket_server_sync
body: <p>I am trying to build Boost with websocket-server-sync example from Boost Beast examples. Firstly I would like to say that I'm building on Windows 10 with MSVS 2017 Professional Version 15.3.5 with SDK version 10.0.14393.0. The steps which I took to build the Boost were following:</p>
  <p>First I started of course <code>bootstrap.cmd</code> and then I run the <code>.\b2 variant=release variant=debug link=static threading=multi address-model=64</code> for building static Boost libraries. Running these two steps was success.</p>
  <p>The next step was to setup Visual Studio solution for running the Boost Beast examples. To be able to do this I needed to invoke cmake bulding system. So I created build folder in \libs\beast and ran the command <code>cmake -G &quot;Visual Studio 15 2017 Win64&quot; ..</code> which created the needed solution for Visual Studio. The cmake process was succesfull. Here the log:</p>
  <pre><code>-- Selecting Windows SDK version 10.0.14393.0 to target Windows 10.0.18363.
  -- The C compiler identification is MSVC 19.11.25508.2
  -- The CXX compiler identification is MSVC 19.11.25508.2
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Check for working C compiler: C:/winapp/MSVS2017PRO/VC/Tools/MSVC/14.11.25503/bin/HostX86/x64/cl.exe - skipped
  -- Detecting C compile features
  -- Detecting C compile features - done
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Check for working CXX compiler: C:/winapp/MSVS2017PRO/VC/Tools/MSVC/14.11.25503/bin/HostX86/x64/cl.exe - skipped
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  -- Found OpenSSL: optimized;C:/drive_d/programming/projects/cpp/3rdparty/external/lib/libcrypto.lib;debug;C:/drive_d/programming/projects/cpp/3rdparty/external/lib/libcryptod.lib (found version &quot;1.1.0i&quot;)
  -- Configuring done
  -- Generating done
  -- Build files have been written to: C:/drive_d/programming/projects/cpp/3rdparty/boost_1_75_0/libs/beast/build
  </code></pre>
  <p>I started the solution in my Visual Studio and tried to build the project &quot;websocket-server-sync&quot; (Configuration: Debug | Platform: x64) and got the following errors:</p>
  <pre><code>...
  3&gt;C:\drive_d\programming\projects\cpp\3rdparty\boost_1_75_0\boost/beast/core/buffer_traits.hpp(123): error C2668: 'boost::asio::buffer_sequence_begin': ambiguous call to overloaded function
  ...
  3&gt;C:\drive_d\programming\projects\cpp\3rdparty\boost_1_75_0\boost/beast/core/impl/buffers_cat.hpp(127): error C3546: '...': there are no parameter packs available to expand
  ...
  
  </code></pre>
  <p>The whole Visual Studio build output is below. From the log it can be seen that the errors happen in lib-beast and websocket-server-sync projects (websocket-server-sync is depending on lib-beast and lib-asio projects which are included in the solution):</p>
  <pre><code>1&gt;------ Rebuild All started: Project: ZERO_CHECK, Configuration: Debug x64 ------
  1&gt;Checking Build System
  2&gt;------ Rebuild All started: Project: lib-asio, Configuration: Debug x64 ------
  2&gt;Building Custom Rule C:/drive_d/programming/projects/cpp/3rdparty/boost_1_75_0/libs/beast/CMakeLists.txt
  2&gt;lib_asio.cpp
  2&gt;lib-asio.vcxproj -&gt; C:\drive_d\programming\projects\cpp\3rdparty\boost_1_75_0\libs\beast\build\Debug\lib-asio.lib
  3&gt;------ Rebuild All started: Project: lib-beast, Configuration: Debug x64 ------
  3&gt;Building Custom Rule C:/drive_d/programming/projects/cpp/3rdparty/boost_1_75_0/libs/beast/CMakeLists.txt
  3&gt;lib_beast.cpp
  3&gt;C:\drive_d\programming\projects\cpp\3rdparty\boost_1_75_0\boost/beast/core/buffer_traits.hpp(123): error C2668: 'boost::asio::buffer_sequence_begin': ambiguous call to overloaded function
  3&gt;C:\drive_d\programming\projects\cpp\3rdparty\boost_1_75_0\boost/asio/buffer.hpp(399): note: could be 'const boost::asio::const_buffer *boost::asio::buffer_sequence_begin&lt;add_rvalue_reference&lt;_Ty&gt;::type&gt;(const ConstBuffer &amp;,enable_if&lt;std::is_convertible&lt;const add_rvalue_reference&lt;_Ty&gt;::type*,const boost::asio::const_buffer*&gt;::value,void&gt;::type *) noexcept'
  3&gt;        with
  3&gt;        [
  3&gt;            _Ty=const unknown-type &amp;,
  3&gt;            ConstBuffer=add_rvalue_reference&lt;const unknown-type&amp;&gt;::type
  3&gt;        ]
  3&gt;C:\drive_d\programming\projects\cpp\3rdparty\boost_1_75_0\boost/asio/buffer.hpp(389): note: or       'const boost::asio::mutable_buffer *boost::asio::buffer_sequence_begin&lt;add_rvalue_reference&lt;_Ty&gt;::type&gt;(const MutableBuffer &amp;,enable_if&lt;std::is_convertible&lt;const add_rvalue_reference&lt;_Ty&gt;::type*,const boost::asio::mutable_buffer*&gt;::value,void&gt;::type *) noexcept'
  3&gt;        with
  3&gt;        [
  3&gt;            _Ty=const unknown-type &amp;,
  3&gt;            MutableBuffer=add_rvalue_reference&lt;const unknown-type&amp;&gt;::type
  3&gt;        ]
  3&gt;C:\drive_d\programming\projects\cpp\3rdparty\boost_1_75_0\boost/beast/core/buffer_traits.hpp(123): note: while trying to match the argument list '(add_rvalue_reference&lt;_Ty&gt;::type)'
  3&gt;        with
  3&gt;        [
  3&gt;            _Ty=const unknown-type &amp;
  3&gt;        ]
  3&gt;C:\drive_d\programming\projects\cpp\3rdparty\boost_1_75_0\boost/beast/core/impl/buffers_cat.hpp(127): note: see reference to alias template instantiation 'buffers_iterator_type&lt;unknown-type&gt;' being compiled
  3&gt;C:\drive_d\programming\projects\cpp\3rdparty\boost_1_75_0\boost/beast/http/chunk_encode.hpp(251): note: see reference to class template instantiation 'boost::beast::buffers_cat_view&lt;boost::beast::http::detail::chunk_size,boost::asio::const_buffer,boost::beast::http::chunk_crlf&gt;::const_iterator' being compiled
  3&gt;C:\drive_d\programming\projects\cpp\3rdparty\boost_1_75_0\boost/asio/execution/relationship.hpp(474): note: see reference to class template instantiation 'boost::asio::execution::detail::relationship_t&lt;0&gt;' being compiled
  3&gt;C:\drive_d\programming\projects\cpp\3rdparty\boost_1_75_0\boost/asio/execution/outstanding_work.hpp(475): note: see reference to class template instantiation 'boost::asio::execution::detail::outstanding_work_t&lt;0&gt;' being compiled
  3&gt;C:\drive_d\programming\projects\cpp\3rdparty\boost_1_75_0\boost/asio/execution/occupancy.hpp(123): note: see reference to class template instantiation 'boost::asio::execution::detail::occupancy_t&lt;0&gt;' being compiled
  3&gt;C:\drive_d\programming\projects\cpp\3rdparty\boost_1_75_0\boost/asio/execution/mapping.hpp(604): note: see reference to class template instantiation 'boost::asio::execution::detail::mapping_t&lt;0&gt;' being compiled
  3&gt;C:\drive_d\programming\projects\cpp\3rdparty\boost_1_75_0\boost/asio/execution/context.hpp(130): note: see reference to class template instantiation 'boost::asio::execution::detail::context_t&lt;0&gt;' being compiled
  3&gt;C:\drive_d\programming\projects\cpp\3rdparty\boost_1_75_0\boost/asio/execution/bulk_guarantee.hpp(687): note: see reference to class template instantiation 'boost::asio::execution::detail::bulk_guarantee_t&lt;0&gt;' being compiled
  3&gt;C:\drive_d\programming\projects\cpp\3rdparty\boost_1_75_0\boost/asio/execution/blocking_adaptation.hpp(663): note: see reference to class template instantiation 'boost::asio::execution::detail::blocking_adaptation_t&lt;0&gt;' being compiled
  3&gt;C:\drive_d\programming\projects\cpp\3rdparty\boost_1_75_0\boost/asio/execution/blocking.hpp(836): note: see reference to class template instantiation 'boost::asio::execution::detail::blocking_t&lt;0&gt;' being compiled
  3&gt;C:\drive_d\programming\projects\cpp\3rdparty\boost_1_75_0\boost/beast/core/impl/buffers_cat.hpp(127): error C3546: '...': there are no parameter packs available to expand
  3&gt;Done building project &quot;lib-beast.vcxproj&quot; -- FAILED.
  4&gt;------ Rebuild All started: Project: websocket-server-sync, Configuration: Debug x64 ------
  4&gt;Building Custom Rule C:/drive_d/programming/projects/cpp/3rdparty/boost_1_75_0/libs/beast/example/websocket/server/sync/CMakeLists.txt
  4&gt;websocket_server_sync.cpp
  4&gt;C:\drive_d\programming\projects\cpp\3rdparty\boost_1_75_0\boost/beast/core/buffer_traits.hpp(123): error C2668: 'boost::asio::buffer_sequence_begin': ambiguous call to overloaded function
  4&gt;C:\drive_d\programming\projects\cpp\3rdparty\boost_1_75_0\boost/asio/buffer.hpp(399): note: could be 'const boost::asio::const_buffer *boost::asio::buffer_sequence_begin&lt;add_rvalue_reference&lt;_Ty&gt;::type&gt;(const ConstBuffer &amp;,enable_if&lt;std::is_convertible&lt;const add_rvalue_reference&lt;_Ty&gt;::type*,const boost::asio::const_buffer*&gt;::value,void&gt;::type *) noexcept'
  4&gt;        with
  4&gt;        [
  4&gt;            _Ty=const unknown-type &amp;,
  4&gt;            ConstBuffer=add_rvalue_reference&lt;const unknown-type&amp;&gt;::type
  4&gt;        ]
  4&gt;C:\drive_d\programming\projects\cpp\3rdparty\boost_1_75_0\boost/asio/buffer.hpp(389): note: or       'const boost::asio::mutable_buffer *boost::asio::buffer_sequence_begin&lt;add_rvalue_reference&lt;_Ty&gt;::type&gt;(const MutableBuffer &amp;,enable_if&lt;std::is_convertible&lt;const add_rvalue_reference&lt;_Ty&gt;::type*,const boost::asio::mutable_buffer*&gt;::value,void&gt;::type *) noexcept'
  4&gt;        with
  4&gt;        [
  4&gt;            _Ty=const unknown-type &amp;,
  4&gt;            MutableBuffer=add_rvalue_reference&lt;const unknown-type&amp;&gt;::type
  4&gt;        ]
  4&gt;C:\drive_d\programming\projects\cpp\3rdparty\boost_1_75_0\boost/beast/core/buffer_traits.hpp(123): note: while trying to match the argument list '(add_rvalue_reference&lt;_Ty&gt;::type)'
  4&gt;        with
  4&gt;        [
  4&gt;            _Ty=const unknown-type &amp;
  4&gt;        ]
  4&gt;C:\drive_d\programming\projects\cpp\3rdparty\boost_1_75_0\boost/beast/core/impl/buffers_cat.hpp(127): note: see reference to alias template instantiation 'buffers_iterator_type&lt;unknown-type&gt;' being compiled
  4&gt;C:\drive_d\programming\projects\cpp\3rdparty\boost_1_75_0\boost/beast/http/chunk_encode.hpp(251): note: see reference to class template instantiation 'boost::beast::buffers_cat_view&lt;boost::beast::http::detail::chunk_size,boost::asio::const_buffer,boost::beast::http::chunk_crlf&gt;::const_iterator' being compiled
  4&gt;C:\drive_d\programming\projects\cpp\3rdparty\boost_1_75_0\boost/asio/execution/relationship.hpp(474): note: see reference to class template instantiation 'boost::asio::execution::detail::relationship_t&lt;0&gt;' being compiled
  4&gt;C:\drive_d\programming\projects\cpp\3rdparty\boost_1_75_0\boost/asio/execution/outstanding_work.hpp(475): note: see reference to class template instantiation 'boost::asio::execution::detail::outstanding_work_t&lt;0&gt;' being compiled
  4&gt;C:\drive_d\programming\projects\cpp\3rdparty\boost_1_75_0\boost/asio/execution/occupancy.hpp(123): note: see reference to class template instantiation 'boost::asio::execution::detail::occupancy_t&lt;0&gt;' being compiled
  4&gt;C:\drive_d\programming\projects\cpp\3rdparty\boost_1_75_0\boost/asio/execution/mapping.hpp(604): note: see reference to class template instantiation 'boost::asio::execution::detail::mapping_t&lt;0&gt;' being compiled
  4&gt;C:\drive_d\programming\projects\cpp\3rdparty\boost_1_75_0\boost/asio/execution/context.hpp(130): note: see reference to class template instantiation 'boost::asio::execution::detail::context_t&lt;0&gt;' being compiled
  4&gt;C:\drive_d\programming\projects\cpp\3rdparty\boost_1_75_0\boost/asio/execution/bulk_guarantee.hpp(687): note: see reference to class template instantiation 'boost::asio::execution::detail::bulk_guarantee_t&lt;0&gt;' being compiled
  4&gt;C:\drive_d\programming\projects\cpp\3rdparty\boost_1_75_0\boost/asio/execution/blocking_adaptation.hpp(663): note: see reference to class template instantiation 'boost::asio::execution::detail::blocking_adaptation_t&lt;0&gt;' being compiled
  4&gt;C:\drive_d\programming\projects\cpp\3rdparty\boost_1_75_0\boost/asio/execution/blocking.hpp(836): note: see reference to class template instantiation 'boost::asio::execution::detail::blocking_t&lt;0&gt;' being compiled
  4&gt;C:\drive_d\programming\projects\cpp\3rdparty\boost_1_75_0\boost/beast/core/impl/buffers_cat.hpp(127): error C3546: '...': there are no parameter packs available to expand
  4&gt;C:\drive_d\programming\projects\cpp\3rdparty\boost_1_75_0\boost/beast/http/parser.hpp(56): error C2338: BodyReader type requirements not met
  4&gt;C:\drive_d\programming\projects\cpp\3rdparty\boost_1_75_0\boost/beast/websocket/impl/handshake.hpp(48): note: see reference to class template instantiation 'boost::beast::http::parser&lt;false,boost::beast::http::basic_string_body&lt;char,std::char_traits&lt;char&gt;,std::allocator&lt;char&gt;&gt;,std::allocator&lt;char&gt;&gt;' being compiled
  4&gt;C:\drive_d\programming\projects\cpp\3rdparty\boost_1_75_0\boost/beast/websocket/impl/handshake.hpp(56): note: see reference to class template instantiation 'boost::beast::websocket::stream&lt;NextLayer,deflateSupported&gt;::handshake_op&lt;Handler&gt;::data' being compiled
  4&gt;C:\drive_d\programming\projects\cpp\3rdparty\boost_1_75_0\boost/beast/websocket/impl/handshake.hpp(185): note: see reference to class template instantiation 'boost::beast::websocket::stream&lt;NextLayer,deflateSupported&gt;::handshake_op&lt;Handler&gt;' being compiled
  4&gt;Done building project &quot;websocket-server-sync.vcxproj&quot; -- FAILED.
  ========== Rebuild All: 2 succeeded, 2 failed, 0 skipped ==========
  
  </code></pre>
  <p>Can somebody point me what is here happening or what did I do wrong?</p>