Your message dated Mon, 16 Sep 2002 08:40:36 -0400
with message-id <[EMAIL PROTECTED]>
and subject line libstdc++5-dev: not a bug
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 15 Sep 2002 18:19:59 +0000
>From [EMAIL PROTECTED] Sun Sep 15 13:19:59 2002
Return-path: <[EMAIL PROTECTED]>
Received: from pling.qwghlm.org [193.122.42.66] 
        by master.debian.org with esmtp (Exim 3.12 1 (Debian))
        id 17qdzy-00037u-00; Sun, 15 Sep 2002 13:19:58 -0500
Received: from localhost
        ([127.0.0.1] helo=gomorrah.int.undue.org ident=root)
        by pling.qwghlm.org with esmtp (Exim 3.35 #1 (Debian))
        id 17qdzs-0005Xf-00
        for <[EMAIL PROTECTED]>; Sun, 15 Sep 2002 19:19:53 +0100
Received: from xanadu.int.undue.org ([192.168.0.2])
        by gomorrah.int.undue.org with esmtp (Exim 3.35 #1 (Debian))
        id 17qdzq-0005za-00
        for <[EMAIL PROTECTED]>; Sun, 15 Sep 2002 19:19:50 +0100
Received: from mwk by xanadu.int.undue.org with local (Exim 3.35 #1 (Debian))
        id 17qdwn-0005w1-00
        for <[EMAIL PROTECTED]>; Sun, 15 Sep 2002 19:16:41 +0100
Date: Sun, 15 Sep 2002 19:16:41 +0100
From: Matt Kern <[EMAIL PROTECTED]>
To: Debian Bug Tracking System <[EMAIL PROTECTED]>
Subject: libstdc++5-dev: constness problem with std::set
Message-ID: <[EMAIL PROTECTED]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.3.28i
X-Reportbug-Version: 1.50
Sender: Matt Kern <[EMAIL PROTECTED]>
Delivered-To: [EMAIL PROTECTED]

Package: libstdc++5-dev
Version: 1:3.2.1-0pre1
Severity: normal

The following fragment generates an error for me:

======================================================================
#include <set>


template <class T>
class AutoPtr
{
public:
  T* getObjectPtr () { return 0; }
  const T* getObjectPtr () const { return 0; }
};


class WrappedClass
{
};


class TestClass
{
private:
  typedef std::set<AutoPtr<WrappedClass> > WrappedClassList;
  WrappedClassList _objects;

public:
  void testMethod () {
    for (WrappedClassList::iterator i=_objects.begin (); i!=_objects.end (); 
++i)
      WrappedClass* C = (*i).getObjectPtr ();
  }
};
======================================================================

when compiled with:  g++-3.2 test.cpp

test.cpp: In member function `void TestClass::testMethod()':
test.cpp:27: invalid conversion from `const WrappedClass*' to `WrappedClass*'

I cannot work out if the bug is caused by my installing the debian
packages on woody rather than unstable.  However, the fragment
compiles correctly if std::vector is used in place of std::set.

If the "const T* getObjectPtr () const { return 0; }" line is removed,
it gives the following:

test.cpp: In member function `void TestClass::testMethod()':
test.cpp:26: passing `const AutoPtr<WrappedClass>' as `this' argument of `T*
   AutoPtr<T>::getObjectPtr() [with T = WrappedClass]' discards qualifiers


Regards,
Matt


-- System Information
Debian Release: 3.0
Architecture: i386
Kernel: Linux xanadu 2.4.20pre7int #1 SMP Sat Sep 14 09:47:58 BST 2002 i686
Locale: LANG=C, LC_CTYPE=

Versions of packages libstdc++5-dev depends on:
ii  g++-3.2                    1:3.2.1-0pre1 The GNU C++ compiler.
ii  gcc-3.2-base               1:3.2.1-0pre1 The GNU Compiler Collection (base
ii  libc6-dev                  2.2.5-14.2    GNU C Library: Development Librari
ii  libstdc++5                 1:3.2.1-0pre1 The GNU stdc++ library version 3

---------------------------------------
Received: (at 160978-done) by bugs.debian.org; 16 Sep 2002 12:40:48 +0000
>From [EMAIL PROTECTED] Mon Sep 16 07:40:48 2002
Return-path: <[EMAIL PROTECTED]>
Received: from crack.them.org [65.125.64.184] (mail)
        by master.debian.org with esmtp (Exim 3.12 1 (Debian))
        id 17qvBI-0003Fl-00; Mon, 16 Sep 2002 07:40:48 -0500
Received: from nevyn.them.org ([66.93.61.169] ident=mail)
        by crack.them.org with asmtp (Exim 3.12 #1 (Debian))
        id 17qw7O-0001tf-00
        for <[EMAIL PROTECTED]>; Mon, 16 Sep 2002 08:40:50 -0500
Received: from drow by nevyn.them.org with local (Exim 3.35 #1 (Debian))
        id 17qvB6-0000nz-00
        for <[EMAIL PROTECTED]>; Mon, 16 Sep 2002 08:40:36 -0400
Date: Mon, 16 Sep 2002 08:40:36 -0400
From: Daniel Jacobowitz <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: libstdc++5-dev: not a bug
Message-ID: <[EMAIL PROTECTED]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.5.1i
Delivered-To: [EMAIL PROTECTED]

This is the standard behavior.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


Reply via email to