Re: Dependency loop with templates

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ian Lance Taylor <iant@xxxxxxxxxx> writes:

> I think this may be a bug in the compiler.  Here is a reduced test
> case:
> 
> class c;
> template<typename T> class tm { public: const T& g() const; };
> namespace n {
>   template <class T> int fn(const tm<T> &v) { return fn(v.g());  }
>   int fn(const c *p);
> }
> int main() { tm<c *> v; return n::fn(v); }
> 
> Interestingly, it works as expected without the namespace.
> 
> I'll file this as a bug report and see what happens.

Filed as http://gcc.gnu.org/PR29844.

Ian

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux