public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/7368: std::vector<void const* const>
@ 2002-07-21 11:16 Gabriel Dos Reis
  0 siblings, 0 replies; 4+ messages in thread
From: Gabriel Dos Reis @ 2002-07-21 11:16 UTC (permalink / raw)
  To: gdr; +Cc: gcc-prs

The following reply was made to PR c++/7368; it has been noted by GNATS.

From: Gabriel Dos Reis <gdr@codesourcery.com>
To: vincent.lascaux@ifrance.com
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: c++/7368: std::vector<void const* const>
Date: 21 Jul 2002 20:07:55 +0200

 vincent.lascaux@ifrance.com writes:
 
 [...]
 
 | The following code wont compile
 
 Your program is invalid: You can't instantiate a standard container
 with a non-Assignable object type and expect any meaningful behaviour.
 
 -- Gaby


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: c++/7368: std::vector<void const* const>
@ 2002-07-21 17:26 Phil Edwards
  0 siblings, 0 replies; 4+ messages in thread
From: Phil Edwards @ 2002-07-21 17:26 UTC (permalink / raw)
  To: gdr; +Cc: gcc-prs

The following reply was made to PR c++/7368; it has been noted by GNATS.

From: Phil Edwards <phil@jaj.com>
To: vincent.lascaux@ifrance.com
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: c++/7368: std::vector<void const* const>
Date: Sun, 21 Jul 2002 20:18:44 -0400

 On Sun, Jul 21, 2002 at 05:17:19PM -0000, vincent.lascaux@ifrance.com wrote:
 > 
 > #include <vector>
 > int main { std::vector<void const* const> Foo;}
 
 Gabriel is correct; this is incorrect code.  Apart from the missing ()'s after
 main, which I assume was just a typo in the bug report, you are instantiating
 std::vector with a type that does not meet the requirements.  In particular,
 it cannot be copied or assigned to.
 
 If you configure with --enable-concept-checks, or compile with
 -D_GLIBCPP_CONCEPT_CHECKS, you will see additional errors because of the unmet
 requirements.
 
 
 Phil
 
 -- 
 If ye love wealth greater than liberty, the tranquility of servitude greater
 than the animating contest for freedom, go home and leave us in peace.  We seek
 not your counsel, nor your arms.  Crouch down and lick the hand that feeds you;
 and may posterity forget that ye were our countrymen.            - Samuel Adams


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: c++/7368: std::vector<void const* const>
@ 2002-07-21 11:11 gdr
  0 siblings, 0 replies; 4+ messages in thread
From: gdr @ 2002-07-21 11:11 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, gdr, nobody, vincent.lascaux

Synopsis: std::vector<void const* const>

Responsible-Changed-From-To: unassigned->gdr
Responsible-Changed-By: gdr
Responsible-Changed-When: Sun Jul 21 11:11:23 2002
Responsible-Changed-Why:
    Analyzed.
State-Changed-From-To: open->closed
State-Changed-By: gdr
State-Changed-When: Sun Jul 21 11:11:23 2002
State-Changed-Why:
    Not a bug.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7368


^ permalink raw reply	[flat|nested] 4+ messages in thread

* c++/7368: std::vector<void const* const>
@ 2002-07-21 10:26 vincent.lascaux
  0 siblings, 0 replies; 4+ messages in thread
From: vincent.lascaux @ 2002-07-21 10:26 UTC (permalink / raw)
  To: gcc-gnats


>Number:         7368
>Category:       c++
>Synopsis:       std::vector<void const* const>
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jul 21 10:26:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Vincent Lascaux
>Release:        gcc version 3.1
>Organization:
>Environment:
winXP
>Description:
The following code wont compile

#include <vector>
int main { std::vector<void const* const> Foo;}

The error is rather large, begins with :
bits/stl_alloc.h: In instantiation of `std::allocator<const void* const>':

main.cpp:5:   instantiated from here
/bits/stl_alloc.h:636: `const _Tp* 
   std::allocator<_Alloc>::address(const _Tp&) const [with _Tp = const void* 
   const]' has already been declared in `std::allocator<const void* const>'
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-07-22  0:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-21 11:16 c++/7368: std::vector<void const* const> Gabriel Dos Reis
  -- strict thread matches above, loose matches on Subject: below --
2002-07-21 17:26 Phil Edwards
2002-07-21 11:11 gdr
2002-07-21 10:26 vincent.lascaux

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).