Error C2039 using portable syntax for MultiIndex with Boost 1.34.1 on VC6
I am trying to use Boost Multi_Index from build 1.34.1 to set up a
collection of structs. This Multi Index container will have 2 unique keys
(ID and Name), since I have to be able to search it with either key. I
made the compiler-specific corrections for VC++ 6.0 SP5:
boost::multi_index::multi_index_container
member_offset
My complete declaration is:
struct ID();
struct Name();
typedef boost::multi_index::multi_index_container<
PDCUTestMessage,
boost::multi_index::ordered_unique<
boost::multi_index::tag<ID>,
boost::multi_index::member_offset
PDCUMessageList;
Later, I attempt to set up indicies for both of these keys, according to
VC++ 6.0 compiler-specific syntax to bypass the Get/Tag issue:
typedef index
Anybody have anything on this?? Anything at all?
El 19/05/2011, a las 17:00, "tangleman@secules.net"
I am trying to use Boost Multi_Index from build 1.34.1 to set up a collection of structs. [...] Later, I attempt to set up indicies for both of these keys, according to VC++ 6.0 compiler-specific syntax to bypass the Get/Tag issue:
typedef index
::type IDIndex; typedef index ::type NameIndex; Now the error. using the above code, I get the following error:
error C2039: 'type': is not a member of "global namespace" referencing the two typedef lines above.
Hi Chris, Sorry i can't dig into this deeper now as I have no access to my environment. Please try
typedef boost::multi_index::index
::type IDIndex; typedef boost::multi_index::index ::type NameIndex;
Does this help? Joaquín M López Muñoz Telefónica, Investigación y Desarrollo Este mensaje se dirige exclusivamente a su destinatario. Puede consultar nuestra política de envío y recepción de correo electrónico en el enlace situado más abajo. This message is intended exclusively for its addressee. We only send and receive email on the basis of the terms set out at. http://www.tid.es/ES/PAGINAS/disclaimer.aspx
typedef boost::multi_index::index
::type IDIndex; typedef boost::multi_index::index ::type NameIndex;
Joaquin,
That did seem to fix that error. Thanks!
I could've sworn that I tried that before and it didn't work. Now, however,
I've got the same error occuring in one of the boost classes:
lambda_traits.hpp. I'm not explicitly using lambda_traits, so it must be
multi_index that is using it. Here's the error and location:
C2039: 'access_traits': is not a member of 'tuples'
line 106 in lambda_traits:
104 template
Tangleman
typedef boost::multi_index::index
::type IDIndex; typedef boost::multi_index::index ::type NameIndex;
I could've sworn that I tried that before and it didn't work. Now, however, I've got the same error occuring in one of the boost classes: lambda_traits.hpp. I'm not explicitly using lambda_traits, so it must be multi_index that is using it. Here's the error and location:
C2039: 'access_traits': is not a member of 'tuples'
line 106 in lambda_traits:
104 template
struct tuple_element_as_reference { 105 typedef typename 106 boost::tuples::access_traits< 107 typename boost::tuples::element ::type 108 >::non_const_type type; 109 }; I'll try to look for a solution online myself, as well as wait for any suggestions.
Sorry, my post a few moments ago was supposed to be in followup to this new error (reference above). I still found nothing. I'll try posting on other forums too. Any help? Please? Thanks, Chris
El 23/05/2011 17:21, Chris Secules escribió:
I could've sworn that I tried that before and it didn't work. Now, however, I've got the same error occuring in one of the boost classes: lambda_traits.hpp. I'm not explicitly using lambda_traits, so it must be multi_index that is using it. Here's the error and location:
C2039: 'access_traits': is not a member of 'tuples'
line 106 in lambda_traits:
104 template
struct tuple_element_as_reference { 105 typedef typename 106 boost::tuples::access_traits< 107 typename boost::tuples::element ::type 108>::non_const_type type; 109 }; I'll try to look for a solution online myself, as well as wait for any suggestions.
You're providing too little info, I'm afraid. As far as I can tell, Boost.MultiIndex is not
using Boost.Lambda implicitly or explicitly, so I don't know how lambda_traits.hpp got
included.
* Can you reproduce the problem in a short example program?
* Can you double check you're not using Boost.Lambda yourself?
* Please try (if nothing else does help) to include
I still have nothing on this. Anybody? Joaquin?
participants (5)
-
Chris Secules
-
JOAQUIN M. LOPEZ MUÑOZ
-
joaquin@tid.es
-
Tangleman
-
tangleman@secules.net