
This has, in general, nothing to do with Fusion or Range. The problem is, with your two statements,
using namespace boost::fusion; using namespace boost;
pulls in a potentially huge number of functions and classes. Many of these functions are unconstrained templates, eg. boost::begin() is. So which begin() function are you referring to? The correct way to use boost.range is to call boost::begin().
-Thorsten
I was following the examples in the boost range documentation fairly closely - they do not use boost::begin(). Anyhow I would have thought either one of those two should work in this case. Why doesn't boost::fusion::begin have a default implementation that calls boost::begin? I am really thinking that fusion might not be what I thought it was; I thought I would be able to take a function that used to work on a homogeneous container and then I could 'fusion'-ize it so that the same code would compile with any heterogeneous container or homogenous container. Apparently this is not the case; I think I need to use Fusion for heterogeneous and Range for homogenous, and have separate code to deal with each. -- John