KazDragon / telnetpp

A C++ library for interacting with Telnet streams
MIT License
63 stars 10 forks source link

Include <ostream> in variable.cpp #215

Closed Cheney-W closed 4 years ago

Cheney-W commented 4 years ago

In a future version of MSVC, \ doesn't transitively include\. This port will compile failed with variable.cpp(109): error C2679: binary '<<': no operator found which takes a right-hand operand of type 'const char *' (or there is no acceptable conversion), so I add include\ into the header file.


This change is Reviewable

KazDragon commented 4 years ago

It seems to me that this is unneeded since I already include iosfwd. Could you comment?

Cheney-W commented 4 years ago

@KazDragon In the future version of MSVC, there is no mutual include relationship between \ and \, and I have verified that when only include\, this library still build failed with error C2679.

KazDragon commented 4 years ago

Ok, I see. One last question, though, because there's no call to operator<< in variable.hpp. Is the problem also resolved if the include is in variable.cpp?

Also, I've fixed the issues with CI, so if you rebase, those should also pass.

Cheney-W commented 4 years ago

Yes, this issue could be solved by adding include in variable.cpp.

KazDragon commented 4 years ago

Thanks, Cheney-W. I really appreciate the contribution.