[ConceptGCC] |
ConceptGCC :Re: Compiler Bug?! |
From: Douglas Gregor (dgregor_at_[hidden])
Date: 2006-07-05 17:01:38
> I came across a problem when working with conceptGCC. While tracking down
> the error I came up with the following simple program:
[snip example]
>
> The error message is:
> test.cpp: In function int main():
> test.cpp:28: error: no matching function for call to test(s&, t&)
> test.cpp:19: note: candidates are: void test(S, T) [with S = s, T = t]
> <where clause>
> test.cpp:28: error: invalid use of undefined type concept B<s>
> test.cpp:8: error: declaration of concept B<s>
> test.cpp:28: note: same-type constraint std::SameType<typename
> B<S>::typeB, typename B<T>::typeB> is not satisfied (<type error> is
> not double)
>
> I do not understand why it even uses a concept B<s>. Is there possibly a
> compiler bug?! Or can anyone see a problem in my program?
Definitely a compiler bug. A B<T>::typeB was turning into a B<S>::typeB
(then, later on down the pipe, B<s>::typeB) because I forgot to perform a
certain template argument substitution.
This problem is now fixed in Subversion revision 323. Thanks again!
Doug