Boost logo

Boost Users :

From: richard_cox_at_[hidden]
Date: 2003-01-09 07:43:54


On Wednesday, January 08, 2003 5:29 PM, Randy Bowen
[mailto:rbowen_at_[hidden]] wrote:
> -----Original Message-----
> From:
> Sent:
> To: Boost-Users_at_[hidden]
> Subject: RE: [Boost-Users] Problem with BOOST_STATIC_ASSERT
>
>
> Thanks for investigating this, John. I don't have access to
> the beta VC7.1 compiler. Do you (or does anyone else) know
> if this will still be a problem with the forthcoming version
> of the Microsoft compiler?
>
> Randy Bowen
>
>
>
> -----Original Message-----
> From: John Maddock [mailto:john_maddock_at_[hidden]]
> Sent: Wednesday, January 08, 2003 4:17 AM
> To: Boost-Users_at_[hidden]
> Subject: Re: [Boost-Users] Problem with BOOST_STATIC_ASSERT
>
>
> > Some further follow-up on this. I've created a minimal
> program that
> > exhibits the new problem behavior:
> >
> > /******************************************/
> > #include <boost/type_traits.hpp>
> > #include <boost/static_assert.hpp>
> >
> > template < typename ValueType >
> > struct A
> > {
> > BOOST_STATIC_ASSERT(boost::is_integral<ValueType>::value);
> > };
> >
> > extern "C" int main(int argc, char* argv[])
> > {
> > return 0;
> > }
> > /******************************************/
> >
> > The fact that this assertion fails is counter-intuitive to
> me, since
> > there is no instantiation to compile. Note that this
> behavior seems
> > limited to the use of "is_integral" as the type predicate.
> Constructing
> > a similar program using "is_POD" behaves as expected:
>
> I can reproduce that with both VC6 and VC7, all the other
> compilers I have access to are OK with it. It's clearly a
> compiler bug, because the assert is triggered even though no
> instance of the template class is ever created. Unfortunately
> I don't have any kind of workaround :-(
>
> John Maddock
> http://ourworld.compuserve.com/homepages/john_maddock/index.ht
m

The code as quoted built without error OK on VC++7.1 RC2 (Final Beta)
here... using snapshot of boost taken last weekend.

Richard Cox
Senior Software Developer
Dell Technology Online
All opinions and statements mine and do not in any way (unless expressly
stated) imply anything at all on behalf of my employer


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