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++/15671] definition fails to find templated constructor declaration


------- Additional Comments From bangerth at dealii dot org  2004-06-01 14:44 -------
You have these templated constructors in your class declaration: 
   template<typename R> 
    Powerset(Range<R> r, Alloc<E> alloc = Alloc<E>()); 
 
   template<typename R> 
    Powerset(Row<Range<R> > r, Alloc<E> alloc = Alloc<E>()); 
 
and you try to define this one: 
  template<typename E, template<typename> class Alloc> 
  template<typename R> 
  inline 
  Powerset<E, Alloc>:: 
  Powerset(Range<R> r, 
           const Alloc<E>& a) 
Obviously, it must be the first declaration, since the first argument 
is Range<R>, not Row<Range<R> >, but in the declaration the second 
argument is a value, while in the definition it is a reference. So 
the compiler seems right to complain, no? 
 
W. 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


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


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