This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/12164] Unambiguous template reported as ambiguous - sometimes


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12164


bangerth at dealii dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING


------- Additional Comments From bangerth at dealii dot org  2003-09-04 14:34 -------
Here's a reduced testcase: 
----------------------------------------------- 
struct X {};  
 
template<typename C, typename T, typename S = void, typename P = void> 
class R; 
 
template<typename T, typename S> 
class R<X, T, S, void>  {}; 
 
template<typename C, typename T> 
class R<C, T, void, void>  {}; 
 
template class R<X,int,void,void>; 
---------------------------------------------- 
 
It indeed fails with gcc 3.2, 3.3 and mainline. It compiles with icc, though. 
 
However, I must admit that I fail to see why it should succeed -- both versions of 
R are matches for the instantiation. Why do you think that the code should compile, 
and which version should be taken? 
 
W.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]