juliobg / asio_http

HTTP client library for Boost.Asio
MIT License
59 stars 14 forks source link

Build failing on MSVC: parameter pack must be expanded in this context #5

Open cqjjjzr opened 4 years ago

cqjjjzr commented 4 years ago

Platform: Windows 10 build 2004 Compiler: MSVC 19.25.28612

cmake --build . fails with error messages below:

C:\Users\cqjjj\source\3rdp\asio_http\implementation\connection_pool.cpp(36,1): error C3520: 'I': parameter pack must be expanded in this context [C:\Users\cqjjj\source\3rdp\asio_http\asio_http.vcxproj]
C:\Users\cqjjj\source\3rdp\asio_http\implementation\connection_pool.cpp(107): message : see reference to class template instantiation 'asio_http::internal::template_to_tuple<asio_http::internal::http_content,asio_http::internal::encoding,asio_http::internal::http_client_connection,asio_http::internal::ssl_transport>'  being compiled [C:\Users\cqjjj\source\3rdp\asio_http\asio_http.vcxproj]
C:\Users\cqjjj\source\3rdp\asio_http\implementation\connection_pool.cpp(150): message : see reference to function template instantiation 'auto asio_http::internal::make_shared_stack<asio_http::internal::http_content,asio_http::internal::encoding,asio_http::internal::http_client_connection,asio_http::internal::ssl_tra nsport,std::tuple<std::shared_ptr<asio_http::internal::http_stack_shared>,_Ty &,std::pair<std::string,uint16_t>>,std::tuple<>,std::tuple<std::shared_ptr<asio_http::internal::http_stack_shared>>,std::tuple<std::shared_ptr<asio_http::internal::http_stack_shared>,_Ty &,std::basic_string<char,std::char_traits<char>,std:: allocator<char>>,asio_http::ssl_settings>>(std::tuple<std::shared_ptr<asio_http::internal::http_stack_shared>,_Ty &,std::pair<std::string,uint16_t>>,std::tuple<>,std::tuple<std::shared_ptr<asio_http::internal::http_stack_shared>>,std::tuple<std::shared_ptr<asio_http::internal::http_stack_shared>,_Ty &,std::basic_stri ng<char,std::char_traits<char>,std::allocator<char>>,asio_http::ssl_settings>)' being compiled [C:\Users\cqjjj\source\3rdp\asio_http\asio_http.vcxproj]
          with
          [
              _Ty=boost::asio::io_context
          ]

Affected source:

template<template<std::size_t N, typename> class... Ls>
struct template_to_tuple
{
  template<typename P, std::size_t... I>
  using type = std::tuple<Ls<I, P>...>; // ERROR
};

Thanks.

MichaelWheeley commented 4 years ago

ditto on this problem, other online helps implies ... missing so tried I... but this causes other errors