Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
cqjjjzr opened this issue Apr 11, 2020 · 1 comment
Open

Comments

@cqjjjzr
Copy link

cqjjjzr commented Apr 11, 2020

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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants