|
Boost Users : |
From: Hicham Mouline (hicham_at_[hidden])
Date: 2008-01-07 11:17:44
hello,
#include <iostream>
#include <algorithm>
int main()
{
const double d = std::max(5.0, 6.0);
return 0;
}
This works fine. <algorithm> is supposed to be included to use the max algorithm.
<algorithm> comes with VisualC++ headers, which intel uses.
The strange thing is that when adding
#include <boost/date_time/posix_time/posix_time.hpp>
before or after <algorithm>
#include <iostream>
#include <algorithm>
#include <boost/date_time/posix_time/posix_time.hpp>
int main()
{
const double d = std::max(5.0, 6.0);
return 0;
}
1>.\main.cpp(9): error: expected an identifier
1> const double d = std::max(5.0, 6.0);
1> ^
1>
1>.\main.cpp(9): error: expected an identifier
1> const double d = std::max(5.0, 6.0);
Inclusing of that header seems somehow to damage "max".
Gcc4.1/boost doesn't have this problem.
any ideas,
rds,
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net