[chrono] Intel Composer XE 2011 unable to compile chrono library

Hi,
The purpose of this email is to get some insight on the problem we faced
when trying to compile chrono from the 1.47 Beta 1 package. I have tried
both the latest released compiler (2011 Update 4) and the current SP1 beta.
There is no issue with VS 2010 SP1's compiler.
It was first surfaced here:
http://comments.gmane.org/gmane.comp.lib.boost.user/68421. The error
received can be seen below:
< snip >
chrono.cpp
.\boost/chrono/duration.hpp(94): error: expected an expression
&& (boost::is_convertible

It will happily compile. It is rather bizarre that this is necessary, which leads Vicente and I to believe that there is a bug in the Intel Compiler. What do you guys think? I have also posted to the Intel forums, the thread can be seen here: http://software.intel.com/en-us/forums/showthread.php?t=84061
Looks like a bug to me - if you have a reduced test case I file a bug report with Intel, HTH, John.

On Wed, Jul 6, 2011 at 9:39 AM, John Maddock
It will happily compile. It is rather bizarre that this is necessary, which leads Vicente and I to believe that there is a bug in the Intel Compiler. What do you guys think? I have also posted to the Intel forums, the thread can be seen here: http://software.intel.com/en-us/forums/showthread.php?t=84061
Looks like a bug to me - if you have a reduced test case I file a bug report with Intel,
HTH, John. _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
I was the original bug reporter. My apologies for not getting back on the suggestions made, I was busy and forgot about it. Thanks for the effort, much appreciated, will use suggested patch. /Bo

Edward Rankin wrote:
Hi,
The purpose of this email is to get some insight on the problem we faced when trying to compile chrono from the 1.47 Beta 1 package. I have tried both the latest released compiler (2011 Update 4) and the current SP1 beta. There is no issue with VS 2010 SP1's compiler.
It was first surfaced here: http://comments.gmane.org/gmane.comp.lib.boost.user/68421. The error received can be seen below: < snip > chrono.cpp .\boost/chrono/duration.hpp(94): error: expected an expression && (boost::is_convertible<Rep2, ^
.\boost/chrono/duration.hpp(124): error: expected an expression && (boost::is_convertible<Rep, ^ < snip >
After some discussion with Vicente and some testing by me, it turns out that Intel was not happy with the first operand of the && operator in the following snippet of code:
template <class Duration, class Rep2, bool = ( (boost::is_convertible<typename Duration::rep, typename common_type<typename Duration::rep, Rep2>::type>::value) && (boost::is_convertible<Rep2, typename common_type<typename Duration::rep, Rep2>::type>::value) ) > struct duration_divide_imp { };
If we place an additional parenthesis around that first operand like this:
template <class Duration, class Rep2, bool = ( ( (boost::is_convertible<typename Duration::rep, typename common_type<typename Duration::rep, Rep2>::type>::value) ) && (boost::is_convertible<Rep2, typename common_type<typename Duration::rep, Rep2>::type>::value) ) > struct duration_divide_imp { };
It will happily compile. It is rather bizarre that this is necessary, which leads Vicente and I to believe that there is a bug in the Intel Compiler. What do you guys think? I have also posted to the Intel forums, the thread can be seen here: http://software.intel.com/en-us/forums/showthread.php?t=84061
Regards,
Edward
Hi Edward, I committed the change on the trunk. Please, let me know if there is some issue as the I'm not able to check with Intel compilers, and the regression test don't have a win Intel compiler. Thanks, Vicente -- View this message in context: http://boost.2283326.n4.nabble.com/chrono-Intel-Composer-XE-2011-unable-to-c... Sent from the Boost - Users mailing list archive at Nabble.com.
participants (4)
-
Bo Jensen
-
Edward Rankin
-
John Maddock
-
Vicente Botet