This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: libstdc++/3016: stl_queue.h bugs wrt compliance
- To: nobody at gcc dot gnu dot org
- Subject: Re: libstdc++/3016: stl_queue.h bugs wrt compliance
- From: Brendan Kehoe <brendan at zen dot org>
- Date: 31 May 2001 22:16:07 -0000
- Cc: gcc-prs at gcc dot gnu dot org,
- Reply-To: Brendan Kehoe <brendan at zen dot org>
The following reply was made to PR libstdc++/3016; it has been noted by GNATS.
From: Brendan Kehoe <brendan@zen.org>
To: Phil Edwards <pedwards@disaster.jaj.com>
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: libstdc++/3016: stl_queue.h bugs wrt compliance
Date: Thu, 31 May 2001 23:16:02 +0100
>>>>> "Phil" == Phil Edwards <pedwards@disaster.jaj.com> writes:
On Thu, May 31, 2001 at 09:50:54PM -0000, brendan@zen.org wrote:
> *************** protected:
> *** 76,81 ****
> _Sequence c;
> public:
> ! queue() : c() {}
> ! explicit queue(const _Sequence& __c) : c(__c) {}
>
> bool empty() const { return c.empty(); }
> --- 76,80 ----
> _Sequence c;
> public:
> ! explicit queue(const _Sequence& __c = _Sequence()) : c(__c) {}
>
> bool empty() const { return c.empty(); }
Phil> I disagree with removing the copy ctor. Just because it isn't
Phil> mandated doesn't mean it isn't allowed. What if I wished to
Phil> construct a vector-of-queue-of-T? Queue wouldn't meet the
Phil> copy-constructible requirement.
Hmm, I believe the copy ctor is still there, it's just now got the default
argument that's required by the standard. We remove the default constructor,
making queue instead set up a container if one wasn't specified by whatever is
creating the queue object.
B
--
Brendan Kehoe brendan@zen.org
http://www.zen.org/~brendan/