Boost logo

Boost :

From: Gary Powell (Gary.Powell_at_[hidden])
Date: 2001-06-11 17:15:25


[Jens Maurer wrote]
> The function library currently under review contains a type
'nil_t' with an
> instance 'nil'. It is a replacement for "0" or "NULL" in any code. The
> implementation is trivial, but it should probably be placed in its own
header
> because it's usefulness extends beyond 'function'. The code is just:

If we decide to have some kind of null pointer with a separate
type, it should be in a separate header file (or possibly in utility.hpp
if simple enough). It appears to have uses in template metaprogramming
as well (end-of-tuple) (Gary).
On the other hand, the template metaprogramming usage seems to
be sufficiently different from the value-based view we have in
boost.function that these may well be two different types.

> namespace boost {
> struct nil_t

I'd like to see more experience with the need to zero boost.function
objects where func.clear() is not possible. Otherwise, I'd like
to avoid the nil issue in the first round.
<<
Now having seen the problem I'd like to have a acceptance of function with a
"pending/nil.hpp" implementation of nil, that both function, Spirit, and
Tuples could use. Tuples just needs a unique type. I think Spirit does too.
So the value conversion stuff is all for function and whatever else needs
it. And whatever changes are made, Spirit and Tuple libraries should be just
fine.

Then schedule a review of nil.hpp soon.

  Yours,
 -gary-

gary.powell_at_[hidden]


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