I'm trying to use ut with MS-STL and your attempt of avoiding including std headers seems to cause an issue. The issue is that your declaration does not match what the std header is doing, therefore generating a bunch of warnings and linker errors. For instance, you did this:
namespace std { // iosfwd
template<class> struct char_traits;
template<class, class> class basic_ostream;
extern basic_ostream<char, char_traits<char>> clog; // only used if defined
} // namespace std
but the actual definition of std::clog in <iostream> is like this:
_EXPORT_STD extern "C++" __PURE_APPDOMAIN_GLOBAL _CRTDATA2_IMPORT ostream clog;
which expands into:
extern "C++" __declspec(dllimport) ostream clog;
I guess trying to avoid std headers is a worthy goal, but forward-declaring all the std things in a truly platform independent way would be not simple. I personally think you would need to give up on that, or at least give options to just include std headers.
By the way, clog is not defined in <iosfwd> and it requires <iostream>, according to what I understand.
I'm trying to use
utwith MS-STL and your attempt of avoiding including std headers seems to cause an issue. The issue is that your declaration does not match what the std header is doing, therefore generating a bunch of warnings and linker errors. For instance, you did this:but the actual definition of
std::clogin<iostream>is like this:which expands into:
I guess trying to avoid std headers is a worthy goal, but forward-declaring all the std things in a truly platform independent way would be not simple. I personally think you would need to give up on that, or at least give options to just include std headers.
By the way,
clogis not defined in<iosfwd>and it requires<iostream>, according to what I understand.