|
Boost Users : |
Subject: [Boost-users] multi_index with base class member
From: david joeyoung (david.joe2005_at_[hidden])
Date: 2009-11-05 03:28:16
please give me some advices.
I get a compile error,when to index on base class member.
the codes are listed below:
struct Foo
{
int a;
};
struct Bar : public Foo
{
int b;
};
struct idx0 {};
typedef multi_index_container<
Bar,
indexed_by<
ordered_unique<
tag < idx0 > ,member < Bar,int,&Bar::a>
>
>
> test_type;
Error 1 error C2440: 'specialization' : cannot convert from 'int Foo::* ' to
'int Bar::* '
and the codes are compiled in boost 1.40, vs 2008 sp1
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