Boost logo

Boost :

From: David Abrahams (abrahams_at_[hidden])
Date: 2001-01-27 19:11:28


I'm finding this a bit difficult at the moment, partly because I think the
concept checking library ought to integrate better with
BOOST_STATIC_ASSERT(). For example, how do you specify what is a valid
argument to counting_iterator()? Well (ignoring hacks for broken compilers)
it must either be an integer type for which numeric_limits<T>::is_integer is
true, OR it must be a valid iterator. I'd like to write something like:

BOOST_STATIC_ASSERT(std::numeric_limits<T>::is_integer ||
RandomAccessIteratorConcept<T>::value);

But I don't think I can do that... can I?

The other thing I love about BOOST_STATIC_ASSERT() is that don't need to
remember to write checks differently based on context, wheras the concept
checking lib has boost_function_requires<>() and BOOST_CLASS_REQUIRES().

Also [aside], I realize that the concept checking classes share most of
their names with the concepts themselves, but does that really justify using
MixedCaseNames in this case? After all, we have names like
forward_iterator_tag as precedent in the standard, and standard precedent is
why we chose this naming convention.

-Dave


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