i have a trouble with a function template implementation in a .inl file (visual c++)
I have this on a header file.
math.h ->>
#ifndef _MATH_H
#define _MATH_H
#include <math.h>
template<class REAL=float>
struct Math
{
     // inside this structure , there are a lot of functions , for example this..
     static REAL  sin ( REAL __x );
     static REAL  abs ( REAL __x );
};
#include "implementation.inl"     // include inl file
#endif
and this is the .inl file.
implementation.inl -->>
template<class REAL>
REAL Math<REAL>::sin (REAL __x)
{
    return (REAL) sin ( (double) __x );
}
template<class REAL>
REAL Math<REAL>::abs(REAL __x)
{
    if( __x < (REAL) 0 )
        return - __x;
    return __x;
}
the sine function throw me an error at run time when i call it. However , abs function works correctly.
i think the trouble is the call to one of the functions of the header math.h inside the .inl files
why I can´t use math.h functions inside .inl file ?
 
     
    