Boost logo

Boost Testing :

Subject: Re: [Boost-testing] [VC++10] Could someone please see if this compiles?
From: Jeremiah Willcock (jewillco_at_[hidden])
Date: 2010-05-30 22:28:59


On Mon, 31 May 2010, KTC wrote:

> On 31/05/2010 03:15, Jeremiah Willcock wrote:
>> On Mon, 31 May 2010, KTC wrote:
>>
>>> On 31/05/2010 02:26, Jeremiah Willcock wrote:
>>>>
>>>> int main(int, char**) {
>>>> // a<d<e, c, int>, float e::*>::type** x = (double**)0;
>>>> // a<d<e, c, int>, float e::*>::type** x;
>>>> a<d<e, c, int>, float e::*> x;
>>>> return 0;
>>>> }
>>>
>>> LOL, they all fail to compile. That's all 3 declaration of "x", with
>>> or without declaration of "member".
>>
>> And they're all the same ambiguity error (the one that kept showing up
>> before)?
>>
>> -- Jeremiah Willcock
>
> Well the first two lines' errors are exactly the same.
>
>
> 1>------ Build started: Project: Test, Configuration: Debug Win32 ------
> 1>Build started 31/05/2010 03:21:05.
> 1>InitializeBuildStatus:
> 1> Touching "Debug\Test.unsuccessfulbuild".
> 1>ClCompile:
> 1> main.cpp
> 1>c:\documents and settings\ktc\my documents\visual studio
> 2010\projects\test\test\main.cpp(24): error C2752: 'a<G,P>' : more than one
> partial specialization matches the template argument list
> 1> with
> 1> [
> 1> G=d<e,c,int>,
> 1> P=float e::*
> 1> ]
> 1> c:\documents and settings\ktc\my documents\visual studio
> 2010\projects\test\test\main.cpp(15): could be 'a<d<P,c,Q>,TB::* >'
> 1> c:\documents and settings\ktc\my documents\visual studio
> 2010\projects\test\test\main.cpp(5): or 'a<G,TB::* >'
> 1>c:\documents and settings\ktc\my documents\visual studio
> 2010\projects\test\test\main.cpp(24): error C2039: 'type' : is not a member
> of 'a<G,P>'
> 1> with
> 1> [
> 1> G=d<e,c,int>,
> 1> P=float e::*
> 1> ]
> 1>c:\documents and settings\ktc\my documents\visual studio
> 2010\projects\test\test\main.cpp(24): error C2065: 'type' : undeclared
> identifier
> 1>c:\documents and settings\ktc\my documents\visual studio
> 2010\projects\test\test\main.cpp(24): error C2065: 'x' : undeclared
> identifier
> 1>
> 1>Build FAILED.
> 1>
> 1>Time Elapsed 00:00:00.54
> ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
>
>
> The third line doesn't talk about 'type' & 'x' being undeclared identifier.
> But then that line doesn't have ::type in so not much of a surprise.
>
> <snip>
> 1> c:\documents and settings\ktc\my documents\visual studio
> 2010\projects\test\test\main.cpp(5): or 'a<G,TB::* >'
> 1>
> 1>Build FAILED.
> <snip>

So the third version is the simplest one that still gets the ambiguity
error? I.e., that error doesn't just show up in the first two? Could you
also please try (with the third version of main) commenting out all of the
definitions of "type" earlier in the program? Does it still break then?

-- Jeremiah Willcock


Boost-testing list run by mbergal at meta-comm.com