
"David Abrahams" <dave@boost-consulting.com> wrote in message:
"Jonathan Turkanis" <technews@kangaroologic.com> writes:
"David Abrahams" <dave@boost-consulting.com> wrote in message
It's hard for me to understand why you would need has_xxx for this purpose, or how you would use it.
Well, you could look at the attachment .... ;-)
I did, but got mired in details.
<snip>
Why not just copy the implementation of is_base_and_derived and templatize the conversion operators in the Host class?
I thought of that. I liked the posted version because it just uses out-of-the box components. Maybe it just doesn't look mired in details to me because I wrote it :-). BTW, the first macro BOOST_IO_BOOL_TRAIT_DEF in the attachement is not relevant to the current discussion. The macro BOOST_IO_IOS_TRAIT_DEF conatins the entire implementation of the above technique. Jonathan