[Bug c++/45515] New: Unable to find base class constructor of templated base class

2010-09-03 Thread andareed at gmail dot com
The following code fails to compile:

template class T
class Foo {
 public:
  Foo(int i, int j) {}
};

class Bar : public Fooint {
  Bar() : Foo(0, 0) {}
};

This produces the following output:

foo.cc: In constructor ?Bar::Bar()?:
foo.cc:8: error: class ?Bar? does not have any field named ?Foo?
foo.cc:8: error: no matching function for call to ?Fooint::Foo()?
foo.cc:4: note: candidates are: FooT::Foo(int, int) [with T = int]
foo.cc:2: note: Fooint::Foo(const Fooint)

If I change line 8 to Bar() : Fooint(0, 0) {} it compiles fine. The
original code also compiles fine with clang and comeau. Tested with head gcc,
4.3, and 4.4.


-- 
   Summary: Unable to find base class constructor of templated base
class
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: andareed at gmail dot com
 GCC build triplet: x86_64-linux-gnu
  GCC host triplet: x86_64-linux-gnu
GCC target triplet: x86_64-linux-gnu


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



[Bug c++/45515] Unable to find base class constructor of templated base class

2010-09-03 Thread andareed at gmail dot com


--- Comment #1 from andareed at gmail dot com  2010-09-03 08:41 ---
Never mind, it compiles with head gcc.


-- 

andareed at gmail dot com changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||FIXED


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