[cfe-dev] Template w/derived func return type equivalence bug

Douglas Gregor dgregor at apple.com
Thu Jan 28 10:03:20 PST 2010


On Jan 25, 2010, at 3:34 PM, david raila wrote:

> I've distilled an issue that I'm having down to the following code snippet,
> which I believe should compile, but instead clang is flagging "not 
> covariant" return types...
> 
> #include<stdexcept>
> 
> class base : public std::exception
> {
> public:
>  virtual base * move() throw () = 0;
> };
> 
> template <typename T>
> class derived : public base
> {
> public:
>         derived *move() throw() {return 0;}
> };

Definitely a bug. Could you file a Bugzilla at http://llvm.org/bugs/ so we don't lose track of this bug?

	- Doug



More information about the cfe-dev mailing list