[snipped discussion about whether calling convention modifiers make
STL code non-compliant]
On 13 Sep., robertwess wrote:
It's still unclear where this code is coming from. If the OP is
trying to use a Windows specific header file, the associated
library is unlikely to be available in binary form on other
platforms in a form intended to be used with the Windows specific
header. And I'm still having trouble trying to understand what
the function is supposed to do in practical terms.
The code in question is from MS's ostream header (in the code I have
posted recently I took the liberty to replace the type _Myt with
std::ostream, but it is actually typedef'ed as basic_ostream<_E,
_Tr>):
template<class _E, class _Tr = char_traits<_E> >
class basic_ostream : virtual public basic_ios<_E, _Tr> {
public:
typedef basic_ostream<_E, _Tr> _Myt;
[snip]
_Myt& operator<<(_Myt& (__cdecl *_F)(_Myt&))
{
return ((*_F)(*this));
}
[snip]
};
I understand that above definition adds a definition that is not
part of the standard. So it would be still right to say that MS's
iostream header is not standard-conformant because it lacks the
required operator that takes standard IO manipulators, wouldn't it?
stream, calls the function with the stream as a parameter).