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++/21903] Default argument of template function causes a compile-time error


------- Additional Comments From bangerth at dealii dot org  2005-06-03 22:27 -------
In private mail, I got another testcase that is even weirder: 
--------------------------- 
struct O { 
    template<typename T> struct B { 
        void set (T, bool=true); 
    }; 
 
    struct D : public B<int> {}; 
}; 
 
void x () 
{ 
  O::B<int> d; 
  d.set(1); 
} 
---------------------------- 
Note that now we allocate an object of type O::B<int>, and get the same 
error as before. The type O::D isn't used anywhere; however, if we comment 
out the line in which it is declared, the test suddenly starts to compile. 
 
What does confuse me, to be honest, is that icc shows the same behavior... 
 
Nathan, Giovanni? 
 
W. 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nathan at gcc dot gnu dot
                   |                            |org


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


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