joboccara/pipes

Error in send.hpp "'forward_as_tuple' is not a member of 'std'

Closed this issue · 3 comments

Hello I am trying to explore pipes library since last 2 days.
My tool chain is : Qt 5.13.0 with MinGW7.3.0 , CMake 3.15.4
System :- Windows
When I tried to add #include <pipes/pipes.hpp>
It actually gave me parsing error as below

In file included from C:/PROGRA2/pipes/include/pipes/base.hpp:4:0,
from C:/PROGRA
2/pipes/include/pipes/impl/concepts.hpp:7,
from C:/PROGRA2/pipes/include/pipes/adjacent.hpp:4,
from C:/PROGRA
2/pipes/include/pipes/pipes.hpp:4,
from E:\Languages\QT-Programs\Pipes_Cplusplus\PipesInCplusplus\main.cpp:2:
C:/PROGRA2/pipes/include/pipes/send.hpp: In function 'void pipes::send(ValuesThenPipeline&& ...)':
C:/PROGRA
2/pipes/include/pipes/send.hpp:38:50: error: 'forward_as_tuple' is not a member of 'std'
detail::send(detail::send_tag<0>{}, std::forward_as_tuple(FWD(valuesThenPipeline)...), std::make_index_sequence<sizeof...(ValuesThenPipeline) - 1>{});
^~~~~~~~~~~~~~~~
mingw32-make.exe[2]: *** [CMakeFiles\PipesInCplusplus.dir\build.make:77: CMakeFiles/PipesInCplusplus.dir/main.cpp.obj] Error 1
mingw32-make.exe[1]: *** [CMakeFiles\Makefile2:76: CMakeFiles/PipesInCplusplus.dir/all] Error 2
mingw32-make.exe: *** [Makefile:83: all] Error 2

And when I added two header files in send.hpp
#include <stddef.h> & tuple

It solved above error
The stddef.h file was added for size_t and tuple is added for forward_as_tuple function.

I am not sure whether it's a issue or it's a system problem?

I faced the same, added tuple and it worked.

What was wrong?
I didn't used CMake wast just testing the lib out

I faced the same, added tuple and it worked.

What was wrong?
I didn't used CMake wast just testing the lib out

I don't know what was wrong I just tried to run with CMake. And it gave me errors as I mentioned above and I just added two files. But I figured out is that in fle send.hpp forward_as_tuple function is used which is part of that's why may be it is giving error.

I've include the header in this commit, which fixes the problem, if I understand correctly.
I'll close the thread then, feel free to reopen if this doesn't fix the problem.