Boost logo

Boost :

From: Alex Chovanec (achovane_at_[hidden])
Date: 2004-09-09 21:29:56


Hello,

A while back, I proposed a template metafunction called 'is_iterator', but
the consensus seemed to be that it was not feasible from an implementation
standpoint. At Jonathan Turkanis' suggestion, I went ahead and implemented
the less ambitions 'is_dereferenceable', along with two other metafunctions:

    Requirements:

        Given t of type T &, if the expression *t is not well-formed, then
it must
        neither be ambiguous nor violate access.

    Description:

        is_lvalue_dereferenceable<T> - true if *t is well-formed and an
lvalue
        is_value_dereferenceable<T> - true if *t is well-formed and non-void
        is_dereferenceable<T> - true if *t is well-formed

I would like to offer these up for inclusion in boost, whether in namespace
boost or in boost::detail. (presumably the latter, since that's where the
similar 'is_incrementable' is found).

I have posted the source for these metafunctions along with a unit test in
the YahooGroups Files section in a folder called 'is_dereferenceable'.

Please let me know if these are of interest to anyone.

Alex Chovanec


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