[PATCH] Implement DR21

David Majnemer david.majnemer at gmail.com
Tue Jun 25 15:16:59 PDT 2013


Committed in r184882.


On Tue, Jun 25, 2013 at 1:08 PM, Richard Smith <richard at metafoo.co.uk>wrote:

> LGTM.
>
> It looks like we still don't reject this:
>
>   struct S { template<typename T = int> friend void f() {} };
>   template<typename> void f();
>
> ... but I'm happy for us to treat this as part of DR226 and call DR21 done.
>
> On Sat, Jun 22, 2013 at 5:36 PM, David Majnemer
> <david.majnemer at gmail.com> wrote:
> > This patch implements CWG DR21 [*]
> >
> > Interestingly, we properly handled default template arguments on friend
> > class members but not on just friend classes:
> > struct A {
> >   template <class T1> void foo();
> > };
> > class B {
> >   template <class T1 = int> friend void A::foo();
> > };
> >
> > [*] http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#21
> >
> > --
> > David Majnemer
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130625/6c0461fa/attachment.html>


More information about the cfe-commits mailing list