Closed GoogleCodeExporter closed 8 years ago
Interesting! I never thought about this possibility. What's happening is that
when
you call
emitter << ptr;
it first tries to instantiate the templated `operator << ` in the `YAML`
namespace
(since `emitter` is a member of that namespace), and succeeds, with a
conversion of
`foo *` to `bool`, and so never looks for an `operator <<` in the global
namespace.
I'll see what I can do about this.
Original comment by jbe...@gmail.com
on 13 Nov 2009 at 9:48
Thanks!
I try to put pointers to objects in my containers, so being able to overload
the <<
operator for pointer types would be really nice.
Original comment by gers...@gmail.com
on 17 Nov 2009 at 6:59
In r325, it should be possible to overload operator << for pointers. I'm
considering
adding such a templated function for pointer types, but I'm not sure about it.
Let me know if this works for you.
Original comment by jbe...@gmail.com
on 17 Nov 2009 at 8:22
Original issue reported on code.google.com by
gers...@gmail.com
on 13 Nov 2009 at 8:48