|
Boost Users : |
Subject: Re: [Boost-users] [multi_index][config] Visual Studio 2009 and BOOST_NO_MEMBER_TEMPLATE_FRIENDS
From: Joaquin M Lopez Munoz (joaquin_at_[hidden])
Date: 2010-04-06 14:49:47
Daniel Bradburn <moagstar <at> hotmail.com> writes:
>
>
> I have just upgraded a project from Visual Studio 2005 to 2008 and suddenly
> I am getting compile errors using boost::multi_index:error C2247:
> 'boost::multi_index::detail::random_access_index<SuperMeta,TagList>
> ::operator []' not accessible because
> 'boost::multi_index::detail::ordered_index<KeyFromValue,Compare,SuperMeta,
> TagList,Category>' uses 'protected' to inherit from
> 'boost::multi_index::detail::random_access_index<SuperMeta,TagList>'
> I figure that this is to do with the
> BOOST_MULTI_INDEX_PROTECTED_IF_MEMBER_TEMPLATE_FRIENDS define, so I
> tried changing
> #if _MSC_VER <= 1400Â // 1400 == VC++ 8.0
> #Â define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
> #endif
> to
> #if _MSC_VER <= 1500Â // 1500 == VC++ 9.0
> #Â define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
> #endif
> in visualc.hpp which fixes the compile error.
> Is this a bug with the visualc.hpp config in boost?
> I can't believe I would be the first to spot it. Has anyone else
> experienced this?
> Are member template friends actually supported in visual c++ 9?
Hi Daniel, sorry for my taking too long to respond (next time
add [multi_index] --and here possibly [config] too-- so that
I'll be able to notice your post quicker).
This is strange for two reasons:
* MSVC 9.0 is not new and supposedly Boost.Config does already
consider it --and it does not mark BOOST_NO_MEMBER_TEMPLATE_FRIENDS
* Boost.MultiIndex for MSVC 9.0 seems to be running fine,
without any such problem as you report, see column "msvc-9.0" at
http://www.boost.org/development/tests/trunk/developer/multi_index.html
Can you do the following:
1. Compile and run libs/config/test/config_test.cpp (without
your local patch and, if you can afford it, using bjam --if
you can't I guess a manual compile will do also): any
report having to do with BOOST_NO_MEMBER_TEMPLATE_FRIENDS?
2. Can you provide a small, complete test program where the
problem you've observed can be replicated?
Thank you,
JoaquÃn M López Muñoz
Telefónica, Investigación y Desarrollo
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