Re: Class templates and friend function templates



Carl Daniel [VC++ MVP] wrote:

> template <class U,class V>
> friend bool operator == <T>(U u, V v);

should be:

template <class U,class V>
friend bool operator == <T>(C<U> u, C<V> v);

Oddly, VC++ likes it either way, Comeau likes neither. More than likely
it's a VC bug that this code compiles (and appears to behave as desired).

-cd


.



Relevant Pages

  • New Bug: Word 2007: Can result in deletion of template files
    ... We're calling it the "Double Save Prompt" bug. ... It destroys template documents in a non-retrievable fashion. ... I went through the document and applied the new quickstyle sheets to the ...
    (microsoft.public.word.application.errors)
  • Re: VS 2005 Bug?
    ... I can confirm that this is an error in template argument deduction. ... I posted the bug on Microsoft Connect and just a few hour later the ... If you make the effort to report a bug, ...
    (microsoft.public.vc.language)
  • Re: New Bug: Word 2007: Can result in deletion of template files
    ... of a parent template), 3 are affected by this bug, and 1 is not. ... We're calling it the "Double Save Prompt" bug. ... I went through the document and applied the new quickstyle sheets to the ...
    (microsoft.public.word.application.errors)
  • Re: problem with non-existing templates
    ... Microsoft are far from perfect but this could hardly be called a bug! ... Have you tried my suggestion of putting a dummy template in the same ...
    (microsoft.public.word.vba.general)
  • Re: Cannot add reference to Word template project via Automation
    ... OnTime won't help. ... For Each bug in Word.Bugs ... I wonder if a DoEvents after the save and before the close would> work. ... adding a ref does dirty the template and one is asked>>to save the template when exiting word. ...
    (microsoft.public.office.developer.automation)

Loading