I am fairly familiar with the basics of C++, but lack experience (mainly code in Java), so slightly "dumbed down" replies would be appreciated :)
I am extending a larger open source project, which uses a standard visual studio class limits.h, where the following code can be found:
template<> class numeric_limits<double>
: public _Num_float_base
{ // limits for type double
public:
typedef double _Ty;
static _Ty (max)() _THROW0()
{ // return maximum value
return (DBL_MAX);
}
I have now imported another open source project, which uses minwindef.h which has this piece of code in it:
#ifndef max
#define max(a,b) (((a) > (b)) ? (a) : (b))
#endif
The build now breaks because for this line
SUMOReal distance = std::numeric_limits<SUMOReal>::max();
the compiler complains about max() being used without any parameters. Is there any quick way to get around this issue, or can I simply not use the library I imported? :/
Hope this was clear enough, thanks for any suggestions!!