On Saturday 17 June 2006 22:06, Jon S. Berndt wrote:
> > In file included from ../../simgear/math/SGMath.hxx:32,
> >                  from ../../simgear/math/point3d.hxx:54,
> >                  from ../../simgear/math/sg_types.hxx:41,
> >                  from sg_socket.hxx:39,
> >                  from socktest.cxx:6:
> > ../../simgear/math/SGQuat.hxx:134:35: macro "min" requires 2
> > arguments, but only 1 given
>
> Here is the offending code for the first error:
>
>
>   /// Create a quaternion from the angle axis representation where the
> angle /// is stored in the axis' length
>   static Squat fromAngleAxis(const SGVec3<T>& axis)
>   {
>     T nAxis = norm(axis);
>     if (nAxis <= SGLimits<T>::min())
>       return SGQuat(1, 0, 0, 0);
>     T angle2 = 0.5*nAxis;
>     return fromRealImag(cos(angle2), T(sin(angle2)/nAxis)*axis);
>   }
>
>
> Is it legal to call a "min" function with no arguments? The compiler
> doesn't seem to think so, at least.
Perfectly legal.
That is a static member of SGLimits<T> that is basically the same than 
std::numeric_limits. That in turn has a min static member.

On windows, you have that nasty windows.h header defining a min and max macro 
that will interfere with the ISO C++ standard.

Dig into the windows headers, there is a way to avoid windows.h defining that 
macro.

Greetings

          Mathias


-- 
Mathias Fröhlich, email: [EMAIL PROTECTED]


_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to