[PR C++/59930] template friend classes & default args
Nathan Sidwell
nathan@acm.org
Thu Dec 14 19:31:00 GMT 2017
PR 59930 concerns some problems with templated friend classes (of
templates). In rying to clean up our handling, I discovered we were
accepting default args of such things. This is ill formed
[temp.param]/12 'A default template-argument shall not be specified in a
friend class template declaration.'
This patch addresses that problem by extending check_default_tmpl_args
to deal with such friends.
We'll still have to deal with:
template <typename T> class X {
template <typename U, T> friend class Y;
};
which is probably just as involved. But at least this removes one
source of confusion.
nathan
--
Nathan Sidwell
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 59930.diff
Type: text/x-patch
Size: 8556 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20171214/e70604a8/attachment.bin>
More information about the Gcc-patches
mailing list