Boost logo

Boost Users :

Subject: Re: [Boost-users] [Multi-index] : code fail to compile with VS2010 and boost 1.46.1. Proposed workaround
From: Mathieu Peyréga (mathieu.peyrega_at_[hidden])
Date: 2011-05-02 07:56:07


Hello,

I've just been checking and could not find any "using namespace std"
statement in any of the includes...

I've even been checking with reverting to genuine composite_key file and
adding an explicit

namespace boost
{
}
using namespace boost;

before the includes in my cpp file which appear in the following order :

#include <boost/multi_index_container.hpp>
#include <boost/multi_index/tag.hpp>
#include <boost/multi_index/indexed_by.hpp>
#include <boost/multi_index/ordered_index.hpp>
#include <boost/multi_index/member.hpp>
#include <boost/multi_index/composite_key.hpp>

Adding this directive do not solve the issue...

Regards,

Mathieu Peyréga

Le 02/05/2011 13:07, Igor R a écrit :
>> I had to modify the composite_key.hpp file and have following changes :
>>
>> line 1001 :
>> //return operator()(x,make_tuple(cref(y)));
>> return operator()(x,make_tuple(boost::cref(y)));
>>
>> line 1036 :
>> //return operator()(make_tuple(cref(x)),y);
>> return operator()(make_tuple(boost::cref(x)),y);
>>
>> In order to explicitely add the boost namespace for cref.
>>
>> With those changes, it do compile and works very well.
>> Can those changes in composite_key.hpp break something else ? Is there
>> another workaround I would have missed ?
>> I'm suspecting some conflict with new TR1 things i'm not very familiar
>
> Perhaps, you have "using namespace std;" directive somewhere before
> you include this header?
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users


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