public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/21682] Disallowed using declaration
       [not found] <bug-21682-4@http.gcc.gnu.org/bugzilla/>
@ 2013-09-01 13:42 ` paolo.carlini at oracle dot com
  2013-09-02  9:42 ` paolo at gcc dot gnu.org
  2013-09-02  9:44 ` paolo.carlini at oracle dot com
  2 siblings, 0 replies; 9+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-09-01 13:42 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21682

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |paolo.carlini at oracle dot com
   Target Milestone|---                         |4.9.0

--- Comment #7 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Mine.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c++/21682] Disallowed using declaration
       [not found] <bug-21682-4@http.gcc.gnu.org/bugzilla/>
  2013-09-01 13:42 ` [Bug c++/21682] Disallowed using declaration paolo.carlini at oracle dot com
@ 2013-09-02  9:42 ` paolo at gcc dot gnu.org
  2013-09-02  9:44 ` paolo.carlini at oracle dot com
  2 siblings, 0 replies; 9+ messages in thread
From: paolo at gcc dot gnu.org @ 2013-09-02  9:42 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21682

--- Comment #8 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> ---
Author: paolo
Date: Mon Sep  2 09:42:39 2013
New Revision: 202163

URL: http://gcc.gnu.org/viewcvs?rev=202163&root=gcc&view=rev
Log:
/cp
2013-09-02  Paolo Carlini  <paolo.carlini@oracle.com>

    PR c++/21682, implement DR 565
    * name-lookup.c (compparms_for_decl_and_using_decl): New.
    (push_overloaded_decl_1, do_nonmember_using_decl): Use it.

/testsuite
2013-09-02  Paolo Carlini  <paolo.carlini@oracle.com>

    PR c++/21682, implement DR 565
    * g++.dg/template/using24.C: New.
    * g++.dg/template/using25.C: Likewise.
    * g++.dg/template/using26.C: Likewise.

Added:
    trunk/gcc/testsuite/g++.dg/template/using24.C
    trunk/gcc/testsuite/g++.dg/template/using25.C
    trunk/gcc/testsuite/g++.dg/template/using26.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/name-lookup.c
    trunk/gcc/testsuite/ChangeLog


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c++/21682] Disallowed using declaration
       [not found] <bug-21682-4@http.gcc.gnu.org/bugzilla/>
  2013-09-01 13:42 ` [Bug c++/21682] Disallowed using declaration paolo.carlini at oracle dot com
  2013-09-02  9:42 ` paolo at gcc dot gnu.org
@ 2013-09-02  9:44 ` paolo.carlini at oracle dot com
  2 siblings, 0 replies; 9+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-09-02  9:44 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21682

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
                 CC|gcc-bugs at gcc dot gnu.org,       |
                   |paolo.carlini at oracle dot com    |
            Version|4.0.0                       |4.9.0
         Resolution|---                         |FIXED

--- Comment #9 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Done for 4.9.0.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c++/21682] Disallowed using declaration
       [not found] <bug-21682-501@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2009-03-03 21:12 ` dave at boost-consulting dot com
@ 2009-03-03 22:32 ` jason at gcc dot gnu dot org
  3 siblings, 0 replies; 9+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-03-03 22:32 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from jason at gcc dot gnu dot org  2009-03-03 22:31 -------
The names in 26605 make it clearer that it's about SFINAE, but that seems to be
what your testcase is trying to do as well: if the compiler accepts the using,
you would end up with an ambiguous call except that one of the templates is
discarded because only one of the templates has a nested type named "type" for
int or double arguments.

I don't see any reason why you would want to have multiple templates with the
same parameters unless you were using SFINAE to remove all but one of them
during the deduction phase of overload resolution.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21682


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c++/21682] Disallowed using declaration
       [not found] <bug-21682-501@http.gcc.gnu.org/bugzilla/>
  2006-03-10  9:38 ` pcarlini at suse dot de
  2009-03-03 19:34 ` jason at gcc dot gnu dot org
@ 2009-03-03 21:12 ` dave at boost-consulting dot com
  2009-03-03 22:32 ` jason at gcc dot gnu dot org
  3 siblings, 0 replies; 9+ messages in thread
From: dave at boost-consulting dot com @ 2009-03-03 21:12 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from dave at boost-consulting dot com  2009-03-03 21:11 -------
I don't know that SFINAE has anything to do with this.  Looks like I was just
doing namespace composition.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21682


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c++/21682] Disallowed using declaration
       [not found] <bug-21682-501@http.gcc.gnu.org/bugzilla/>
  2006-03-10  9:38 ` pcarlini at suse dot de
@ 2009-03-03 19:34 ` jason at gcc dot gnu dot org
  2009-03-03 21:12 ` dave at boost-consulting dot com
  2009-03-03 22:32 ` jason at gcc dot gnu dot org
  3 siblings, 0 replies; 9+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-03-03 19:34 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from jason at gcc dot gnu dot org  2009-03-03 19:34 -------
This is core issue 565, which has not been addressed by the committe, though
John's comment makes sense to me.  How important is this issue to SFINAE
techniques?


-- 

jason at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jason at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21682


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c++/21682] Disallowed using declaration
       [not found] <bug-21682-501@http.gcc.gnu.org/bugzilla/>
@ 2006-03-10  9:38 ` pcarlini at suse dot de
  2009-03-03 19:34 ` jason at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 9+ messages in thread
From: pcarlini at suse dot de @ 2006-03-10  9:38 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pcarlini at suse dot de  2006-03-10 09:38 -------
*** Bug 26605 has been marked as a duplicate of this bug. ***


-- 

pcarlini at suse dot de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pcarlini at suse dot de


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21682


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c++/21682] Disallowed using declaration
  2005-05-20 17:13 [Bug c++/21682] New: " dave at boost-consulting dot com
  2005-05-20 17:14 ` [Bug c++/21682] " dave at boost-consulting dot com
@ 2005-05-21 14:35 ` pinskia at gcc dot gnu dot org
  1 sibling, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-05-21 14:35 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-05-21 14:35 -------
Confirmed, reduced testcase (which shows the problem):
template <class T>
struct t
{
  typedef typename T::type type;
};
template<> class t<int>{};

template <class T> struct t1{ };
template<> struct t1<int>
{
  typedef int type;
};

namespace name1
{
  template <class S> typename t<S>::type begin(S const& s);
  namespace name2
  {
    template <class S> typename t1<S>::type begin(S const& s);
  }
  using name2::begin;
}

/* Test calling the function. */
int f(int a) { return name1::begin(a); }

struct aa { typedef double type; };
double g(aa t) { return name1::begin(t); }

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |rejects-valid
   Last reconfirmed|0000-00-00 00:00:00         |2005-05-21 14:35:40
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21682


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c++/21682] Disallowed using declaration
  2005-05-20 17:13 [Bug c++/21682] New: " dave at boost-consulting dot com
@ 2005-05-20 17:14 ` dave at boost-consulting dot com
  2005-05-21 14:35 ` pinskia at gcc dot gnu dot org
  1 sibling, 0 replies; 9+ messages in thread
From: dave at boost-consulting dot com @ 2005-05-20 17:14 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From dave at boost-consulting dot com  2005-05-20 17:13 -------
Created an attachment (id=8939)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=8939&action=view)
preprocessed source


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21682


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-09-02  9:44 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-21682-4@http.gcc.gnu.org/bugzilla/>
2013-09-01 13:42 ` [Bug c++/21682] Disallowed using declaration paolo.carlini at oracle dot com
2013-09-02  9:42 ` paolo at gcc dot gnu.org
2013-09-02  9:44 ` paolo.carlini at oracle dot com
     [not found] <bug-21682-501@http.gcc.gnu.org/bugzilla/>
2006-03-10  9:38 ` pcarlini at suse dot de
2009-03-03 19:34 ` jason at gcc dot gnu dot org
2009-03-03 21:12 ` dave at boost-consulting dot com
2009-03-03 22:32 ` jason at gcc dot gnu dot org
2005-05-20 17:13 [Bug c++/21682] New: " dave at boost-consulting dot com
2005-05-20 17:14 ` [Bug c++/21682] " dave at boost-consulting dot com
2005-05-21 14:35 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).