Hi,


2011/7/7 <boost-users-request@lists.boost.org>
---------- Forwarded message ----------
From: Vicente Botet <vicente.botet@wanadoo.fr>
To: boost-users@lists.boost.org
Date: Wed, 6 Jul 2011 15:46:31 -0700 (PDT)
Subject: Re: [Boost-users] [chrono] Intel Composer XE 2011 unable to compile chrono library

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&lt;Rep2,
>                   ^
>
> .\boost/chrono/duration.hpp(124): error: expected an expression
>                   &amp;&amp;  (boost::is_convertible&lt;Rep,
>                   ^
> &lt; snip &gt;
>
> 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 &lt;class Duration, class Rep2,
>         bool = (
>                     (boost::is_convertible&lt;typename Duration::rep,
>                         typename common_type&lt;typename Duration::rep,
> Rep2&gt;::type>::value)
>                 &&  (boost::is_convertible&lt;Rep2,
>                         typename common_type&lt;typename Duration::rep,
> Rep2&gt;::type>::value)
>                 )
>         >
>     struct duration_divide_imp
>     {
>     };
>
> If we place an additional parenthesis around that first operand like this:
>
> template &lt;class Duration, class Rep2,
>         bool = (
>                     ( (boost::is_convertible&lt;typename Duration::rep,
>                         typename common_type&lt;typename Duration::rep,
> Rep2&gt;::type>::value) )
>                 &&  (boost::is_convertible&lt;Rep2,
>                         typename common_type&lt;typename Duration::rep,
> Rep2&gt;::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


I have checked the release candidate and it compiles okay. Thanks.

Edward