|
Boost Users : |
Subject: Re: [Boost-users] [chrono] Intel Composer XE 2011 unable to compile chrono library
From: Edward Rankin (erankin_at_[hidden])
Date: 2011-07-12 04:48:24
Hi,
2011/7/7 <boost-users-request_at_[hidden]>
> ---------- Forwarded message ----------
> From: Vicente Botet <vicente.botet_at_[hidden]>
> To: boost-users_at_[hidden]
> 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<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
>
>
I have checked the release candidate and it compiles okay. Thanks.
Edward
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