|
From: | Dustin Graves |
Subject: | Re: [Openexr-devel] OpenEXR Windows port |
Date: | Fri, 24 Jan 2003 10:38:18 -1000 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021226 Debian/1.2.1-9 |
Luc-Eric Rousseau wrote:
> -----Original Message----- > From: Dustin Graves [mailto:address@hidden > > Last night I did a rough port to Windows with Visual Studio 6 + Intel > 5.0 Compiler. I was unable to use the compilers provided with both > Visual Studio 6.0 and .NET because they do not recognize this > as legal syntax: > > template <class T> > template <class S> > inline bool > Vec2<T>::operator != (const Vec2<S> &v) const > ... > The template followed by a template causes a syntax error. This is a > bug with the compiler, which I'll try reporting to Microsoft. try template <class T, class S>, should be the same
I'd tried this, but these actually aren't the same thing. A template parameter list of a template and its template member cannot be conbined, so there isn't going to be a simple work around for this with the current Microsoft compiler.
> 3. std::min and std::max are unavailable (due to conflict > with min and > max in windefs.h), so std::_MIN and std::_MAX are provided instead. When you need to include windows.h, use #define NOMINMAX before including it. See windef.h. you may also #define WIN32_LEAN_AND_MEAN to speed up compile.
The problem here is that std::min and std::max do not seem to exist with VC6. They are provided with VC .NET, but with VC6 they are renamed to _cpp_min and _cpp_max and then #defined to _MIN and _MAX.
> 5. Scoping error with variable declarations within 'for' loops, > resulting in multiple defines, required variables to be > declared outside > of the 'for' loop, once per function. I'm not too fond of the new scoping rule, but you can enable it in VC++ 6.0 with "Disable language extensions", in the compiler settings. It's off by default because it breaks existing code, in some cases silently.
This works nicely. I will update the project files to include this setting.
[Prev in Thread] | Current Thread | [Next in Thread] |