swap does not compile

Alexandre Oliva aoliva@redhat.com
Tue Jan 13 01:02:00 GMT 2004


On Jan 12, 2004, Alexandre Oliva <aoliva@redhat.com> wrote:

> Not really.  cp_parser_name_lookup_name_simple() can return to
> cp_parser_using_declaration() an overload involving functions in more
> than one namespace, but then do_{local,toplevel}_using_decl() call
> validate_nonmember_using_decl() that extracts the scope from the first
> overload only.

This patch is an attempt to fix the bug.  The one bit I'm not sure of
is whether parser->qualifying_scope is guaranteed to still hold the
correct value at the point I use it.  Would someone more familiar with
the new parser please have a double check?

g++ testsuite completed without regressions, libstdc++ testsuite
pretty much completed similarly.  Ok to install?

Ben, I'll leave the test for the right specialization of swap for
vectors for you (PR 13658), if you don't mind.  I've no idea of how to
test for this kind of stuff in the libstdc++ testsuite.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: gcc-cp-lookup-using-overload.patch
Type: text/x-patch
Size: 6902 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20040113/73e8411b/attachment.bin>
-------------- next part --------------

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Happy GNU Year!                     oliva@{lsd.ic.unicamp.br, gnu.org}
Red Hat GCC Developer                 aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist                Professional serial bug killer


More information about the Libstdc++ mailing list