Boost logo

Boost Users :

From: Eric Niebler (eric_at_[hidden])
Date: 2008-06-09 10:51:03


Patrick Loney wrote:
> Using boost 1.34.1, attempting a simple iteration over a std::list using
> BOOST_FOREACH and getting various compile errors all linked to mpl as
> below
>
> d:\Projects\boost\boost_1_34_1\boost/foreach.hpp(123) : error C3083:
> 'mpl': the symbol to the left of a '::' must be a type
> d:\Projects\boost\boost_1_34_1\boost/foreach.hpp(125) : see
> reference to class template instantiation
> 'Operations::boost::foreach::is_lightweight_proxy<T>' being compiled

"Operations::boost"?

> I have no idea what mpl is and haven't linked in any new libraries to
> allow use of foreach. Any ideas what I'm doing wrong?

Yes. You've probably done something like this:

namespace Operations
{
   #include <boost/foreach.hpp>
}

Don't do that. You can't scope the BOOST_FOREACH macro to a namespace
anyway.

-- 
Eric Niebler
BoostPro Computing
http://www.boostpro.com

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