Boost logo

Boost :

From: Joaquín Mª López Muñoz (joaquin_at_[hidden])
Date: 2007-09-13 05:46:09


John Maddock ha escrito:

> David Abrahams wrote:

[...]

> > I once again recommend the use of the MPL assertion suite for improved
> > error messages.
>
> :-)
>
> Point taken, I'd need an "is_incomplete" predicate for that though, any
> takers? Or would it be a recipe for ODR violations even trying to implement
> such a beast?
>
> My gut feeling at present is that this is more trouble than it's worth...

If you only want the predicate for displaying purposes, maybe you can
use something like this:

  template<typename T,std::size_t Size>
  struct is_complete:boost::mpl::bool_<Size>{};

  BOOST_MPL_ASSERT((is_complete<foo,sizeof(foo)>));

Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk