This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: c++/1046


On Sun, Mar 11, 2001 at 02:38:15PM -0500, Craig Rodrigues wrote:
> http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=1084&database=gcc

I'm assuming that you really do mean 1084, not 1046 like the subject says.
:-)


> Apparently, when used in a parameter list, std::string() is not recognized as
> the invocation of the default constructor.
> I'm not sure if this is a libstdc++ problem or gcc problem.

It's nothing to do with std::string; this is a well-known "problem" of the
C++ language itself.  I highly recommend getting a copy of the C++ Standard
and reading [8.2], which discusses this exact issue.  It's ambiguity in
the parser -- as noted in the PR for c++/1084.

Somebody just asked on comp.compilers for examples of ambiguity
in C++.  I picked this issue for the example in my response,
<URL:http://compilers.iecc.com/comparch/article/01-03-052>.  Nobody's
responded to it, incidentally, so I don't know whether there are mistakes
in my article.


Phil

-- 
pedwards at disaster dot jaj dot com  |  pme at sources dot redhat dot com
devphil at several other less interesting addresses in various dot domains
The gods do not protect fools.  Fools are protected by more capable fools.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]