From: Robert Kawulak (kawulak_at_[hidden])
Date: 2005-10-23 17:38:30


> From: Neal Becker

> I'm thinking something like this:
>
> template<typename checker_t>
> class bounded {...
> bounded (checker_t check) ...
>
> assign () { check (value); }

This is quite similar to what I was going to implement.

> allow checking to be inlined. I guessing the size of a bounded object
> would not necessarily be increased.

If you store checker as a member then the size would certainly be increased
even if checker_t is empty. I'm going to use
boost::compressed_pair<value_type, checker_t> to avoid this. I could
privately inherit from checker_t instead, but I want the value_type member
sub-object to be the first in the object to optimise access to it.

Best regards,
Robert