Boost logo

Boost Users :

From: Stephen Gross (sgross_at_[hidden])
Date: 2005-08-19 14:31:30

I'm trying to static assert the value of a sequence. I've got the syntax
slightly wrong, but I can't quite figure it out. Here's what my code looks

template<typename SEQ, int SIZE>
void assertSeqSize()
  BOOST_STATIC_ASSERT(( boost::equal_to<boost::mpl::size<SEQ>::type,
boost::mpl::int_<SIZE> > )) &&
  "You have attempted to invoke a functor with the incorrect number of

The compiler (gcc 3.3.1) tells me:

../../c++/include/functors/ArgList.h: In function `void
../../c++/include/functors/ArgList.h:46: error: parse error before `>' token
../../c++/include/functors/ArgList.h:46: error: template argument 1 is
../../c++/include/functors/ArgList.h:46: error: parse error before `&&'

Can anyone tell me my mistake? Did I stick an extra '::type' where I didn't
need one?


Stephen Gross
Case Western School of Medicine
Cleveland, OH

"By Grabthar's hammer, by the sons of Worvan, you shall be avenged." - Dr.

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at