Boost logo

Boost :

From: Paul Moore (gustav_at_[hidden])
Date: 2000-10-21 15:58:55

From: Howard Hinnant [mailto:hinnant_at_[hidden]]
> Of course one can get where you need to go with either design. So this
> is purely a stylistic argument, not one of functionality. I personally
> feel that the interface is simpler and easier to remember with fewer
> non-combination names that can be combined with && (or || etc.) as needed.

FWIW, (not much, admittedly, as I don't see myself needing these functions
any time soon...) I agree. Combination names are generally more difficult to
remember (was it is_const_integral or is_integral_const?) and result in more
individual functions. The code using the functions is marginally shorter,
but probably no easier to understand.

As all the queries return compile-time constants, there will be no overhead
in combining with && or || (this is probably obvious to everyone, but it's
worth making the point...)


PS I don't understand all the subtleties of the issues these functions are
designed to address, but I would certainly expect is_integral to test true
on const int. If it doesn't, that's another obstacle to remembering what is
going on...

Boost list run by bdawes at, gregod at, cpdaniel at, john at