Boost logo

Boost Users :

From: Manuel Jung (gzahl_at_[hidden])
Date: 2007-02-28 14:38:31


Manuel Jung wrote:

> Hi,
>
> Im having a problem. I derive class B from class A. class a has the member
> A::id. I want to use this one as key for my MultiIndexContainer. But i get
> the following compiling errors:
>
> test.cpp:41: Fehler: Templateargument »&A::id« konnte nicht in »unsigned
> int B::*« umgewandelt werden
> test.cpp:42: Fehler: Templateargument 2 ist ungültig
> test.cpp:43: Fehler: Templateargument 1 ist ungültig
> test.cpp:44: Fehler: Templateargument 2 ist ungültig
>
> Sorry it on german.
> A testfile for reproducing my problem is attached.
> Can someone help? thanks..
> Greetings
> Manuel Jung

I can add something myself here.
It works, if im using a function, which returns the id. See test2.cpp for
this.

I wonder if member<> just not handles this kind of key extraction?
bye
Manuel Jung



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