GCC 4.4.1 is refusing to find my injected-class-name within a ctor-initializer:
template <typename T>
struct Base
{
Base(int x) {}
};
struct Derived : Base<int>
{
Derived() : Base(2) {}
};
int main()
{
Derived d;
}
test2.cpp: In constructor "Derived::Derived()": test2.cpp:9: error: class "Derived" does not have any field named "Base" test2.cpp:9: error: no matching function for call to "Base<int>::Base()" test2.cpp:4: note: candidates are: Base<T>::Base(int) [with T = int] test2.cpp:3: note: Base<int>::Base(const Base<int>&)
GCC 4.8 compiles it just fine, though.
I'm sure this is supposed to work, and I can't find any standard wording that disagrees with me.
This a GCC 4.4.1 bug, right?
(I did scour GCC Bugzilla but nothing relevant popped out at me.)