I'm asking this question because I'm a bit helpless: this error occurs ONLY with Visual Studio, GCC compiles it without errors or even warnings. Since this is some portable code I'm looking for a solution that works with both compilers (and in best case with no platform-dependent ifdefs
).
error C2512: 'std::basic_ostream<_Elem,_Traits>' : no appropriate default constructor available
happens while constructing an object of type MyObject that is defined as
class MyObject : public Socket, public std::ostream
What special ostream
parameters are expected by VS here?