Steve Pole
2004-05-06 19:08:15 UTC
Hi all,
I am entirely puzzled. I have the following trivial code in a header file:
#include <algorithm>
using std::min;
Visual C++ 6.0 SP4 says
error C2039: 'min' : is not a member of 'std'
followed by
error C2873: 'min' : symbol cannot be used in a using-declaration.
I am not even using std::min yet. The application uses the Trolltech Qt
library v2.3.0, but I actually doubt that this is the cause.
Yes, I have read the "Using std::max bug" thread attentively and I also
know about http://support.microsoft.com/?id=143208. I have tried adding
#define NOMINMAX of #undef min, but to no avail.
The actually puzzling aspect is that I have identical code in the
prototype application which builds fine there - on the same system, with
the same libraries, with the same compiler. I have reproduced the
problem on a second machine.
I am about to use brute force and start 'aligning' the settings in both
.dsp projects until they are identical or until I find the root of the
problem, but these are pretty big projects, so I would be happy about
any other solution...
I'm starting to feel like I'm staring at it, but I just can't see it....
Does someone know what I'm doing wrong ?
CU S>
I am entirely puzzled. I have the following trivial code in a header file:
#include <algorithm>
using std::min;
Visual C++ 6.0 SP4 says
error C2039: 'min' : is not a member of 'std'
followed by
error C2873: 'min' : symbol cannot be used in a using-declaration.
I am not even using std::min yet. The application uses the Trolltech Qt
library v2.3.0, but I actually doubt that this is the cause.
Yes, I have read the "Using std::max bug" thread attentively and I also
know about http://support.microsoft.com/?id=143208. I have tried adding
#define NOMINMAX of #undef min, but to no avail.
The actually puzzling aspect is that I have identical code in the
prototype application which builds fine there - on the same system, with
the same libraries, with the same compiler. I have reproduced the
problem on a second machine.
I am about to use brute force and start 'aligning' the settings in both
.dsp projects until they are identical or until I find the root of the
problem, but these are pretty big projects, so I would be happy about
any other solution...
I'm starting to feel like I'm staring at it, but I just can't see it....
Does someone know what I'm doing wrong ?
CU S>