Anakreon <[EMAIL PROTECTED]> writes:
> The command used for the compilation is:
> g++ -o bug gcc_bug.cpp
>
> The compiler must know that there are no other files involved.
>
> I don't want to waste anybodys time but shouldn't the compiler
> report an error on the above case?
There is no error in your test case; hence the compiler should not
report anything.
It is a perfectly legal C++ technique to declare, but not define
member functions. An example:
class Base { ...
protected:
Base(const Base &); // not implemented
Base &operator=(const Base&); // not implemented
};
The idea here is that instances of the Base class should not
be copied. The author of Base guarantees that if someone writes
Derived class which inherits from Base, they would not be able to
copy the Base part of Derived. If they do, they'll get an error at
link time.
Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.
_______________________________________________
Help-gplusplus mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gplusplus