
On 25/09/12 22:38, Mario Mulansky wrote:
John Bytheway <jbytheway+boost@gmail.com> wrote:
The more general idea of automatically dispatching to the right algebra is more dangerous, because for example it is entirely possible to have a type which is both a Fusion sequence and a Range (but with different semantics in each interpretation). So, I am not suggesting that (though I wouldn't argue against it either).
This would be an edge case where explicit user definition is required, but i think in 99% an algebra dispatcher would be sufficient.
On further reflection I thought of a particular case where this happens. Any std::pair<Iterator, Iterator> is both a Fusion Sequence and a Range, with very different semantics. Just something to consider. John