
15 May
2006
15 May
'06
12:51 p.m.
Joel de Guzman <joel@boost-consulting.com> writes:
Unfortunately for Fusion iterators, I can't find a suitable workaround to enable operator-> return type deduction only when appropriate. In general, an iterator does not know if it is at the end.
That part seems strange to me. It certainly could know whether it's at the end, I think.
Thinking about it some more, you may be right. Maybe I can use the disable_if technique. At the very least, I'll need a is_dereferencable<I> metafunction so I can also disable -> on adapted iterators.
You don't need to disable it; just pick some arbitrary type, like void, for it to return. -- Dave Abrahams Boost Consulting www.boost-consulting.com