public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/2295
@ 2001-03-19 13:16 bkoz
0 siblings, 0 replies; only message in thread
From: bkoz @ 2001-03-19 13:16 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR c++/2295; it has been noted by GNATS.
From: bkoz@gcc.gnu.org
To: gcc-gnats@gcc.gnu.org, nobody@gcc.gnu.org,
schmid@snake.iap.physik.tu-darmstadt.de
Cc:
Subject: Re: c++/2295
Date: 19 Mar 2001 21:14:14 -0000
Synopsis: Scope of rand function
State-Changed-From-To: open->analyzed
State-Changed-By: bkoz
State-Changed-When: Mon Mar 19 13:14:14 2001
State-Changed-Why:
This is actually not a libstd++ failure, and is intstead of name lookup error with g++. Here's a smaller testcase that removes library dependencies:
extern "C" int rand (void) throw ();
namespace std
{
extern "C" int rand(void);
template <class _ForwardIter, class _Generator>
void generate(_ForwardIter __first, _ForwardIter __last, _Generator __gen)
{
for ( ; __first != __last; ++__first)
*__first = __gen();
}
}
using namespace std;
int main()
{
int* i;
int* j;
generate(i, j, rand);
return 0;
}
Compiling this with 20010319 g++ gives:
%COMP.sh 2295.cc
2295.cc: In function `int main()':
2295.cc:46: no matching function for call to `generate(int*&, int*&, <unknown
type>)'
Note the odd <unknown type> bits. EDG can compile this normally.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=2295&database=gcc
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2001-03-19 13:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-19 13:16 c++/2295 bkoz
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).