๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: de.comp.lang.c++
Article #989

g++ Bug

#989
From: Frank Zetzsche
Date: Wed, 13 Dec 1995 20:39
44 lines
985 bytes
Hallo,

bei dem folgenden Programm klappt beim GNU g++ 2.5.8 das รœberladen der Funktion
f nicht. Kann mir jemand sagen, ob dieser Fehler bekannt bzw. behoben ist ?

Vielen Dank,

Frank

//------------------------------------------------------------------------

#include <iostream.h>

class A {

};

void f(A& a, int)
{
   cout << "f(int)" << endl << flush;
}

void f(A& a, long)
{
   cout << "f(long)" << endl << flush;
}


void main()
{
   A a;
   f(a, 3);
   f(a, 3L);
}

// output:
// f(int)
// f(int)

//------------------------------------------------------------------------

-- 
Frank Zetzsche fz@zetzsche.rhein-main.de
Technical Details
Message-ID: <fz-1312952139180001@abraxas.rhein-main.de>
Path: arc1-ca.pugleaf.net!abraxas.rhein-main.de!user

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!abraxas.rhein-main.de!user
From: fz@zetzsche.rhein-main.de (Frank Zetzsche)
Newsgroups: de.comp.lang.c++
Subject: g++ Bug
Date: 13 Dec 1995 20:39:39 GMT
Organization: Individual Network - Rhein-Main
Message-ID: <fz-1312952139180001@abraxas.rhein-main.de>
NNTP-Posting-Host: abraxas.rhein-main.de