Boost logo

Boost Users :

From: John Femiani (JOHN.FEMIANI_at_[hidden])
Date: 2007-10-11 13:17:16


>
> 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


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net