|
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:36:26
On Mon, 31 May 2010, KTC wrote:
> On 31/05/2010 03:28, Jeremiah Willcock wrote:
>
>> 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
>
> Okay, this:
>
>
> template <typename G, typename P>
> struct a {};
>
> template <typename G, typename T, typename B>
> struct a<G, T B::*> {};
>
> struct c {};
>
> template <typename P, typename R, typename Q>
> struct d {};
>
> template <typename P, typename Q, typename T, typename B>
> struct a<d<P, c, Q>, T B::*> {};
>
> struct e {};
>
> int main(int, char**) {
> a<d<e, c, int>, float e::*> x;
> return 0;
> }
>
>
> gives this:
>
>
> 1>------ Build started: Project: Test, Configuration: Debug Win32 ------
> 1>Build started 31/05/2010 03:33:19.
> 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(18): 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(13): 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>
> 1>Build FAILED.
> 1>
> 1>Time Elapsed 00:00:00.17
> ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Thanks for your help. That's what I'm going to submit to Microsoft.
-- Jeremiah Willcock