public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/108820] New: vector::resize(n, v) requires copy_assignable, which is not part of the CopyInsertable concept
@ 2023-02-16 12:25 marc.mutz at hotmail dot com
2023-02-16 12:50 ` [Bug libstdc++/108820] " redi at gcc dot gnu.org
2023-02-16 12:53 ` redi at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: marc.mutz at hotmail dot com @ 2023-02-16 12:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108820
Bug ID: 108820
Summary: vector::resize(n, v) requires copy_assignable, which
is not part of the CopyInsertable concept
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: marc.mutz at hotmail dot com
Target Milestone: ---
The following should work (and does, on MCVS and libc++), because S is
copy_constructible, just not copy_assignable. In particular, S is
CopyInsertable:
// https://godbolt.org/z/61ffqMj8n
#include <vector>
struct S { const int n; };
static_assert(std::is_copy_constructible_v<S>);
static_assert(std::is_nothrow_move_constructible_v<S>);
void test(std::vector<S> &v)
{
v.resize(15, S{42});
}
The libstdc++ implementation tries to instantiate the copy-assignment operator,
though.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug libstdc++/108820] vector::resize(n, v) requires copy_assignable, which is not part of the CopyInsertable concept
2023-02-16 12:25 [Bug libstdc++/108820] New: vector::resize(n, v) requires copy_assignable, which is not part of the CopyInsertable concept marc.mutz at hotmail dot com
@ 2023-02-16 12:50 ` redi at gcc dot gnu.org
2023-02-16 12:53 ` redi at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: redi at gcc dot gnu.org @ 2023-02-16 12:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108820
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
I think we have three bugs about this already.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug libstdc++/108820] vector::resize(n, v) requires copy_assignable, which is not part of the CopyInsertable concept
2023-02-16 12:25 [Bug libstdc++/108820] New: vector::resize(n, v) requires copy_assignable, which is not part of the CopyInsertable concept marc.mutz at hotmail dot com
2023-02-16 12:50 ` [Bug libstdc++/108820] " redi at gcc dot gnu.org
@ 2023-02-16 12:53 ` redi at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: redi at gcc dot gnu.org @ 2023-02-16 12:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108820
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |DUPLICATE
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Yes, this is exactly PR 106239 which I closed as a dup of PR 83981 because
they're both about LWG 2033.
*** This bug has been marked as a duplicate of bug 106239 ***
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-02-16 12:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-16 12:25 [Bug libstdc++/108820] New: vector::resize(n, v) requires copy_assignable, which is not part of the CopyInsertable concept marc.mutz at hotmail dot com
2023-02-16 12:50 ` [Bug libstdc++/108820] " redi at gcc dot gnu.org
2023-02-16 12:53 ` redi at gcc dot gnu.org
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).