error: no viable overloaded '>>='
Opened this issue · 1 comments
theShmoo commented
My simple test code is not compiling:
#include <string>
#include <iostream>
// first problem: WHY DO I NEED OPTIONAL HERE?
#include <optional>
#include "pipes/transform.hpp"
#include "pipes/to_out_stream.hpp"
int main()
{
std::string test{"ABC"};
test
>>= pipes::transform([](char c){return c + 2; })
>>= pipes::to_out_stream(std::cout);
}
For the first problem see #64
For the actual problem:
Compiling this gives an error message:
<source>:15:9: error: no viable overloaded '>>='
>>= pipes::to_out_stream(std::cout);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
Compiler returned: 1
what am i missing here?
theShmoo commented
Ok I got it.
You just have to include:
#include "pipes/operator.hpp"
maybe the pipes should include this by default?