|
Boost : |
From: Edward Diener (eddielee_at_[hidden])
Date: 2004-05-29 12:05:44
JOAQUIN LOPEZ MU?Z wrote:
> I'm trying to make Boost.MultiIndex work for
> MSVC 7.0 an the regression tests show some weird
> results. I'm suspicious this can be related with
> a similar problem in MSVC 6.0 having to do with
> pointers to members being used as template prams.
>
> Would any kind soul with access to MSVC 7.0
> run the following test and report the result?
> TIA
>
> Joaquín M López Muñoz
> Telefónica, Investigación y Desarrollo
>
> ******************
> struct pair
> {
> int x,y;
>
> pair(int x_,int y_):x(x_),y(y_){}
> };
>
> template<int pair::* PtrToPairMember>
> struct foo
> {
> int bar(pair& p){return p.*PtrToPairMember;}
> };
>
> int main()
> {
> pair p(0,1);
> foo<&pair::x> fx;
> foo<&pair::y> fy;
>
> if(fx.bar(p)!=0||fy.bar(p)!=1)return -1;
>
> return 0;
> }
Runs with no errors with Vc7. I ran it in strict Ansi mode with Leon
Zolman's STLfilt.
Running it against Vc6 in strict Ansi mode with STLfilt gives:
MultiIndex.cpp(18): error C2964: invalid
expression as template parameter
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk