Bug found in STL?
Loren James Rittle
rittle@latour.rsch.comm.mot.com
Wed May 23 15:13:00 GMT 2001
[Please report bugs to gcc-bugs not gcc. Better yet, use the GNATS
interface at http://gcc.gnu.org ]
> I'm fairly sure this is legal C++ code. Try compiling this source with
> gcc-2.95.3 and have a look at the errors. Is this a bug?
Thank you for the bug report. I see nothing that makes me think the
code is illegal (with a minor namespace issue resolved that was not
strictly enforced in gcc 2.95.3). I have no idea if anyone is
actively working on fixing bugs with 2.95.3.
This code works fine with prerelease 3.0 (I only added the ``using
namespace std;'' but the other obvious variation of adding std:: to
list<bar*> works as well):
#include <list>
namespace foo
{
typedef void (*destroy) (void* ptr);
class bar
{
public:
bar();
};
}
using namespace foo;
using namespace std;
list<bar*> lb;
More information about the Gcc
mailing list