bug report
Matteo Ceroni
ceroni@students.cs.unibo.it
Tue Jan 11 04:44:00 GMT 2000
Hi,
g++ said I found a bug:
------------------------------------------------------------------------------------------------
> g++ test.cpp
test.cpp:8: Internal compiler error 290.
test.cpp:8: Please submit a full bug report.
test.cpp:8: See <URL: http://www.gnu.org/software/gcc/faq.html#bugreport > for instructions.
------------------------------------------------------------------------------------------------
Here is the source file:
------------------------------------------------------------------------------------------------
#include<functional> // "less" definition
struct Person {
int height;
int age;
};
template<> bool less(const Person& a, const Person& b) { } // wrong attempt to specialize
// "less"
------------------------------------------------------------------------------------------------
I'm using g++ 2.95.2 (Mingw32 distribution for Windows95). In case your header files are
different from mine, here is a bare program that fails as well:
------------------------------------------------------------------------------------------------
template <class T>
struct foo {
bool operator()() { }
};
template<> bool foo() { }
------------------------------------------------------------------------------------------------
More information about the Gcc-bugs
mailing list