|
Boost : |
From: Björn Karlsson (Bjorn.Karlsson_at_[hidden])
Date: 2002-09-26 03:47:40
> From: Markus Schöpflin [mailto:markus.schoepflin_at_[hidden]]
[snip]
> Markus Schöpflin wrote:
> >
> > The problem is with tests of the form:
> >
> > BOOST_CHECK_EQUAL(boost::xtime_get(&xt, boost::TIME_UTC),
> > boost::TIME_UTC);
> >
> > This gets expanded to something that uses the type of the arguments
> > as a template parameter.
> >
> > The problem is that boost::TIME_UTC is an unnamed enum and vacpp 5
> > (rightly? I think yes.) complains, that unnamed types must not be
> > used as a template argument.
> >
> > The fix is easy, change everything like the above to
> >
> > BOOST_CHECK_EQUAL(boost::xtime_get(&xt, boost::TIME_UTC),
> > static_cast<int>(boost::TIME_UTC));
> >
> > et voila, the thread regression tests compile and execute ok.
> >
> > Markus
Yep, according to §14.3.1.2: "A local type, a type with no linkage, an
unnamed type or a type compounded from any of these types shall not be used
as a template argument for a template typeparameter."
I'll apply it to both RC_1_29_0 and the main trunk - thanks for the fix!
Bjorn Karlsson
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk