|
Boost : |
From: John Maddock (John_Maddock_at_[hidden])
Date: 1999-12-09 07:47:38
Howard -
>Steve's single-use classes seem to me to be the "fundamental level".
call_traits to me seems like a derived application. I meant to implement
call_traits in terms of remove_reference (and etc.) by now so I could
talk intelligently about that, but haven't had time. Maybe today...<
Yep OK fair enough,
>If we go Steve's route with seperate structs, perhaps there is no
type_traits class? type_traits was meant to be fundamental description
of types which Steve may have obsoleted. Maybe now there are only
derived applications built upon the seperates (call_traits being a simple
example, ChooseInt.h being a much more complex example). Note that this
is food for thought, not a statement that implies I know what I'm talking
about.<
ChooseInt is an interesting example - it's possible to implement
is_builtin<T> etc in terms of Steve's Platform class, but I don't think you
can implement integer choosing based upon is_builtin - because there is no
explicit ordering of builtin types nor any way to enumerate through them,
to be honest I've been avoiding the integer choosing stuff because it makes
my aging brain cell hurt :-) However it does appear to be more
"fundamental" or at least more versatile than is_builtin<T>.
>The biggest thorn in my side right now is not being able to differentiate
enums from classes and from unions. For example I would like to be able
to pass an enum into Steve's is_empty and have it generate false, instead
of a compile time error. I still don't see any way to do that without
compiler support. :-(<
Neither do I at the moment, although I haven't given up hope - I've been
trying to figure out how to use the fact that all enumerated types have an
"underlying" integer type as a means of spotting them at compile time -
unfortunately I can't think of anything that would work at present.
John.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk