public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: comer@pisem.net
To: gcc-gnats@gcc.gnu.org
Subject: c++/9810: A using-declaration for a template function
Date: Sat, 22 Feb 2003 20:46:00 -0000	[thread overview]
Message-ID: <20030222203646.15169.qmail@sources.redhat.com> (raw)


>Number:         9810
>Category:       c++
>Synopsis:       A using-declaration for a template function
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Sat Feb 22 20:46:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Sergey Shandar
>Release:        3.2 20020818 (prerelease)
>Organization:
>Environment:
Windows, Cygwin
>Description:
struct A
{
	template<class R>
	void F(R)
	{ // line # 5
	}
};

struct B: private A
{
	using A::F; // line # 11
};

int main()
{
	B b;
	b.F(3); // line # 17
	return 0;
}
>How-To-Repeat:
g++ tst51.cpp
>Fix:
struct A
{
	template<class R>
	void F(R)
	{ 
	}
};

struct B: private A
{
	//using A::F; 
	template<class R>
	void F(R r)
	{
		A::F(r);
	}	
};

int main()
{
	B b;
	b.F(3);
	return 0;
}
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="tst51.cpp"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="tst51.cpp"

c3RydWN0IEENCnsNCgl0ZW1wbGF0ZTxjbGFzcyBSPg0KCXZvaWQgRihSKQ0KCXsgLy8gbGluZSAj
IDUNCgl9DQp9Ow0KDQpzdHJ1Y3QgQjogcHJpdmF0ZSBBDQp7DQoJdXNpbmcgQTo6RjsgLy8gbGlu
ZSAjIDExDQp9Ow0KDQppbnQgbWFpbigpDQp7DQoJQiBiOw0KCWIuRigzKTsgLy8gbGluZSAjIDE3
DQoJcmV0dXJuIDA7DQp9DQo=


             reply	other threads:[~2003-02-22 20:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-22 20:46 comer [this message]
2003-02-24 15:07 bangerth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030222203646.15169.qmail@sources.redhat.com \
    --to=comer@pisem.net \
    --cc=gcc-gnats@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).