What version of compiler and OS do you use? I've just checked test case below by Sun C++ 5.6 - 5.9 on Solaris 10. Also I would like to see all command line options which you use to compile.
[code]
#include <cmath>
int main()
{
double d = 0;
std::sin(d);
}
[/code]
No, do NOT do that.
If you attempt to modify any of the library configuration macros, you wind up with declarations in the headers that do not match what is in the library.
In addition, the otherwise dead code enabled in the headers has never been compiled or tested by Sun. If you run into problems, you are on your own.
If you need a more standard-conforming library, you can use STLport that also comes with the compiler. Add the option
-library=stlport4
to every CC command line, compiling and linking.
As noted in the documentation, the default libCstd and STLport are mutually exclusive. You cannot use both in the same program.
No, it is not a bug, it is a 'documented feature' (i.e. a known bug that they do not intend to fix).
See http://developers.sun.com/sunstudio/articles/cmp_stlport_libCstd.html for an explanation of what parts of the standard C++ language are missing from Sun Studio. This includes the template copy constructor for std::pair.