joboccara/pipes

Tests do not build on Visual Studio 2019 version 16.2 with /permissive-

Opened this issue · 3 comments

Error:

  C:\PROGRA~2\MICROS~4\2019\ENTERP~1\VC\Tools\MSVC\1422~1.279\bin\HostX64\x64\cl.exe  /nologo /TP  -I..\..\..\include /permissive- /DWIN32 /D_WINDOWS /W3 /GR /EHsc /MDd /ZI /Ob0 /Od /RTC1 /JMC /showIncludes /FoCMakeFiles\tests.dir\tests\demux.cpp.obj /FdCMakeFiles\tests.dir\ /FS -c ..\..\..\tests\demux.cpp
C:\Users\Administrator\source\repos\pipes\include\helpers\meta.hpp(16): error C2672: 'get': no matching overloaded function found
  C:\Users\Administrator\source\repos\pipes\include\helpers\meta.hpp(29): note: see reference to function template instantiation 'F pipes::detail::for_each_impl<_Ty,std::tuple<std::back_insert_iterator<std::vector<int,std::allocator<int>>>,std::back_insert_iterator<std::vector<int,std::allocator<int>>>>&,0,1>(F &&,Tuple,std::integer_sequence<unsigned __int64,0,1>)' being compiled
          with
          [
              F=pipes::demux_pipe<std::back_insert_iterator<std::vector<int,std::allocator<int>>>,std::back_insert_iterator<std::vector<int,std::allocator<int>>>>::onReceive::<lambda_bcc8ffa6a8da3120d18a205209e637ed>,
              _Ty=pipes::demux_pipe<std::back_insert_iterator<std::vector<int,std::allocator<int>>>,std::back_insert_iterator<std::vector<int,std::allocator<int>>>>::onReceive::<lambda_bcc8ffa6a8da3120d18a205209e637ed>,
              Tuple=std::tuple<std::back_insert_iterator<std::vector<int,std::allocator<int>>>,std::back_insert_iterator<std::vector<int,std::allocator<int>>>> &
          ]
  C:\Users\Administrator\source\repos\pipes\include\demux.hpp(20): note: see reference to function template instantiation 'F pipes::detail::for_each<pipes::demux_pipe<std::back_insert_iterator<std::vector<int,std::allocator<_Ty>>>,std::back_insert_iterator<std::vector<_Ty,std::allocator<_Ty>>>>::onReceive::<lambda_bcc8ffa6a8da3120d18a205209e637ed>,std::tuple<std::back_insert_iterator<std::vector<_Ty,std::allocator<_Ty>>>,std::back_insert_iterator<std::vector<_Ty,std::allocator<_Ty>>>>&>(F &&,Tuple)' being compiled
          with
          [
              F=pipes::demux_pipe<std::back_insert_iterator<std::vector<int,std::allocator<int>>>,std::back_insert_iterator<std::vector<int,std::allocator<int>>>>::onReceive::<lambda_bcc8ffa6a8da3120d18a205209e637ed>,
              _Ty=int,
              Tuple=std::tuple<std::back_insert_iterator<std::vector<int,std::allocator<int>>>,std::back_insert_iterator<std::vector<int,std::allocator<int>>>> &
          ]
  C:\Users\Administrator\source\repos\pipes\include\output_iterator.hpp(33): note: see reference to function template instantiation 'void pipes::demux_pipe<std::back_insert_iterator<std::vector<int,std::allocator<_Ty>>>,std::back_insert_iterator<std::vector<_Ty,std::allocator<_Ty>>>>::onReceive<T>(T &&)' being compiled
          with
          [
              _Ty=int,
              T=int
          ]
  C:\Users\Administrator\source\repos\pipes\include\output_iterator.hpp(33): note: see reference to function template instantiation 'void pipes::demux_pipe<std::back_insert_iterator<std::vector<int,std::allocator<_Ty>>>,std::back_insert_iterator<std::vector<_Ty,std::allocator<_Ty>>>>::onReceive<T>(T &&)' being compiled
          with
          [
              _Ty=int,
              T=int
          ]
  C:\Users\Administrator\source\repos\pipes\include\output_iterator.hpp(13): note: see reference to function template instantiation 'Derived &pipes::OutputIteratorBase<Derived>::operator =<T>(T &&)' being compiled
          with
          [
              Derived=pipes::demux_pipe<std::back_insert_iterator<std::vector<int,std::allocator<int>>>,std::back_insert_iterator<std::vector<int,std::allocator<int>>>>,
              T=int
          ]
  C:\Users\Administrator\source\repos\pipes\include\output_iterator.hpp(13): note: see reference to function template instantiation 'Derived &pipes::OutputIteratorBase<Derived>::operator =<T>(T &&)' being compiled
          with
          [
              Derived=pipes::demux_pipe<std::back_insert_iterator<std::vector<int,std::allocator<int>>>,std::back_insert_iterator<std::vector<int,std::allocator<int>>>>,
              T=int
          ]
  C:\Users\Administrator\source\repos\pipes\tests\demux.cpp(98): note: see reference to function template instantiation 'void pipes::send<pipes::demux_pipe<std::back_insert_iterator<std::vector<int,std::allocator<_Ty>>>,std::back_insert_iterator<std::vector<_Ty,std::allocator<_Ty>>>>,int>(OutputIterator &,T &&)' being compiled
          with
          [
              _Ty=int,
              OutputIterator=pipes::demux_pipe<std::back_insert_iterator<std::vector<int,std::allocator<int>>>,std::back_insert_iterator<std::vector<int,std::allocator<int>>>>,
              T=int
          ]
C:\Users\Administrator\source\repos\pipes\include\helpers\meta.hpp(15): error C2784: 'tuple_element<_Idx,std::pair<_Ty1,_Ty2>>::type &std::get(std::pair<_Ty1,_Ty2> &) noexcept': could not deduce template argument for 'std::pair<_Ty1,_Ty2> &' from 'std::tuple<std::back_insert_iterator<std::vector<int,std::allocator<_Ty>>>,std::back_insert_iterator<std::vector<_Ty,std::allocator<_Ty>>>>'
          with
          [
              _Ty=int
          ]
  C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.22.27905\include\utility(452): note: see declaration of 'std::get'
C:\Users\Administrator\source\repos\pipes\include\helpers\meta.hpp(16): error C2672: 'operator __surrogate_func': no matching overloaded function found

This might be related to #42

Indeed. Do you confirm that tests are now building on your version of VS with /permissive ?

It has been verified as well with Github actions, this can be closed.