public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/114147] New: tuple allocator-extended constructor requires non-explicit default constructor
@ 2024-02-28 10:39 victor.dyachenko at protonmail dot com
2024-02-28 10:48 ` [Bug libstdc++/114147] " victor.dyachenko at protonmail dot com
` (12 more replies)
0 siblings, 13 replies; 14+ messages in thread
From: victor.dyachenko at protonmail dot com @ 2024-02-28 10:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114147
Bug ID: 114147
Summary: tuple allocator-extended constructor requires
non-explicit default constructor
Product: gcc
Version: 10.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: victor.dyachenko at protonmail dot com
Target Milestone: ---
GCC 10.1 fails to compile this code (GCC 9.1 is OK):
#include <tuple>
#include <memory>
struct C {
explicit C() = default;
};
int main()
{
std::tuple<C, int> t(std::allocator_arg, std::allocator<char>{});
}
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug libstdc++/114147] tuple allocator-extended constructor requires non-explicit default constructor
2024-02-28 10:39 [Bug libstdc++/114147] New: tuple allocator-extended constructor requires non-explicit default constructor victor.dyachenko at protonmail dot com
@ 2024-02-28 10:48 ` victor.dyachenko at protonmail dot com
2024-02-28 11:18 ` victor.dyachenko at protonmail dot com
` (11 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: victor.dyachenko at protonmail dot com @ 2024-02-28 10:48 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114147
--- Comment #1 from __vic <victor.dyachenko at protonmail dot com> ---
Why _ImplicitDefaultCtor is required here?
template<typename _Alloc,
_ImplicitDefaultCtor<is_object<_Alloc>::value, _T1, _T2> = true>
_GLIBCXX20_CONSTEXPR
tuple(allocator_arg_t __tag, const _Alloc& __a)
: _Inherited(__tag, __a) { }
Missing overload for explicit tuple(allocator_arg_t, ...)?
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug libstdc++/114147] tuple allocator-extended constructor requires non-explicit default constructor
2024-02-28 10:39 [Bug libstdc++/114147] New: tuple allocator-extended constructor requires non-explicit default constructor victor.dyachenko at protonmail dot com
2024-02-28 10:48 ` [Bug libstdc++/114147] " victor.dyachenko at protonmail dot com
@ 2024-02-28 11:18 ` victor.dyachenko at protonmail dot com
2024-02-28 11:21 ` [Bug libstdc++/114147] [10/11/12/13 Regression] " redi at gcc dot gnu.org
` (10 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: victor.dyachenko at protonmail dot com @ 2024-02-28 11:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114147
--- Comment #2 from __vic <victor.dyachenko at protonmail dot com> ---
Shouldn't this be added?
template<typename _Alloc,
_ExplicitDefaultCtor<is_object<_Alloc>::value, _T1, _T2> = true>
explicit
_GLIBCXX20_CONSTEXPR
tuple(allocator_arg_t __tag, const _Alloc& __a)
: _Inherited(__tag, __a) { }
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug libstdc++/114147] [10/11/12/13 Regression] tuple allocator-extended constructor requires non-explicit default constructor
2024-02-28 10:39 [Bug libstdc++/114147] New: tuple allocator-extended constructor requires non-explicit default constructor victor.dyachenko at protonmail dot com
2024-02-28 10:48 ` [Bug libstdc++/114147] " victor.dyachenko at protonmail dot com
2024-02-28 11:18 ` victor.dyachenko at protonmail dot com
@ 2024-02-28 11:21 ` redi at gcc dot gnu.org
2024-02-28 13:49 ` [Bug libstdc++/114147] [11/12/13 " victor.dyachenko at protonmail dot com
` (9 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: redi at gcc dot gnu.org @ 2024-02-28 11:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114147
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2024-02-28
Known to work| |14.0
Keywords| |rejects-valid
Target Milestone|--- |11.5
Summary|tuple allocator-extended |[10/11/12/13 Regression]
|constructor requires |tuple allocator-extended
|non-explicit default |constructor requires
|constructor |non-explicit default
| |constructor
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
N.B. GCC 10 is no longer supported.
This was fixed on trunk by r14-7225
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug libstdc++/114147] [11/12/13 Regression] tuple allocator-extended constructor requires non-explicit default constructor
2024-02-28 10:39 [Bug libstdc++/114147] New: tuple allocator-extended constructor requires non-explicit default constructor victor.dyachenko at protonmail dot com
` (2 preceding siblings ...)
2024-02-28 11:21 ` [Bug libstdc++/114147] [10/11/12/13 Regression] " redi at gcc dot gnu.org
@ 2024-02-28 13:49 ` victor.dyachenko at protonmail dot com
2024-02-28 14:31 ` [Bug libstdc++/114147] [11/12/13/14 " redi at gcc dot gnu.org
` (8 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: victor.dyachenko at protonmail dot com @ 2024-02-28 13:49 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114147
--- Comment #4 from __vic <victor.dyachenko at protonmail dot com> ---
The latest gcc-14-20240225 snapshot doesn't include this fix. Is there any
chance to have this fixed in 14.1 release?
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug libstdc++/114147] [11/12/13/14 Regression] tuple allocator-extended constructor requires non-explicit default constructor
2024-02-28 10:39 [Bug libstdc++/114147] New: tuple allocator-extended constructor requires non-explicit default constructor victor.dyachenko at protonmail dot com
` (3 preceding siblings ...)
2024-02-28 13:49 ` [Bug libstdc++/114147] [11/12/13 " victor.dyachenko at protonmail dot com
@ 2024-02-28 14:31 ` redi at gcc dot gnu.org
2024-02-29 20:38 ` redi at gcc dot gnu.org
` (7 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: redi at gcc dot gnu.org @ 2024-02-28 14:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114147
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work|14.0 |
Summary|[11/12/13 Regression] tuple |[11/12/13/14 Regression]
|allocator-extended |tuple allocator-extended
|constructor requires |constructor requires
|non-explicit default |non-explicit default
|constructor |constructor
--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Ah it does include it, but it only affects C++20 and later. For older standards
the original code is still used.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug libstdc++/114147] [11/12/13/14 Regression] tuple allocator-extended constructor requires non-explicit default constructor
2024-02-28 10:39 [Bug libstdc++/114147] New: tuple allocator-extended constructor requires non-explicit default constructor victor.dyachenko at protonmail dot com
` (4 preceding siblings ...)
2024-02-28 14:31 ` [Bug libstdc++/114147] [11/12/13/14 " redi at gcc dot gnu.org
@ 2024-02-29 20:38 ` redi at gcc dot gnu.org
2024-03-01 15:12 ` redi at gcc dot gnu.org
` (6 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: redi at gcc dot gnu.org @ 2024-02-29 20:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114147
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |redi at gcc dot gnu.org
--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> ---
For the record, it looks like I broke this in commit r10-908 by adding a
constraint to that constructor (which was good) but not adding another overload
with the explicit constraint (which was bad):
// Allocator-extended constructors.
- template<typename _Alloc>
+ template<typename _Alloc,
+ _ImplicitDefaultCtor<is_object<_Alloc>::value> = true>
tuple(allocator_arg_t __tag, const _Alloc& __a)
: _Inherited(__tag, __a) { }
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug libstdc++/114147] [11/12/13/14 Regression] tuple allocator-extended constructor requires non-explicit default constructor
2024-02-28 10:39 [Bug libstdc++/114147] New: tuple allocator-extended constructor requires non-explicit default constructor victor.dyachenko at protonmail dot com
` (5 preceding siblings ...)
2024-02-29 20:38 ` redi at gcc dot gnu.org
@ 2024-03-01 15:12 ` redi at gcc dot gnu.org
2024-03-04 20:25 ` cvs-commit at gcc dot gnu.org
` (5 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: redi at gcc dot gnu.org @ 2024-03-01 15:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114147
--- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Patch posted: https://gcc.gnu.org/pipermail/gcc-patches/2024-March/646989.html
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug libstdc++/114147] [11/12/13/14 Regression] tuple allocator-extended constructor requires non-explicit default constructor
2024-02-28 10:39 [Bug libstdc++/114147] New: tuple allocator-extended constructor requires non-explicit default constructor victor.dyachenko at protonmail dot com
` (6 preceding siblings ...)
2024-03-01 15:12 ` redi at gcc dot gnu.org
@ 2024-03-04 20:25 ` cvs-commit at gcc dot gnu.org
2024-03-16 10:19 ` [Bug libstdc++/114147] [11/12/13 " cvs-commit at gcc dot gnu.org
` (4 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-03-04 20:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114147
--- Comment #8 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jonathan Wakely <redi@gcc.gnu.org>:
https://gcc.gnu.org/g:0a545ac7000501844670add0b3560ebdbcb123c6
commit r14-9307-g0a545ac7000501844670add0b3560ebdbcb123c6
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Fri Mar 1 11:16:58 2024 +0000
libstdc++: Add missing std::tuple constructor [PR114147]
I caused a regression with commit r10-908 by adding a constraint to the
non-explicit allocator-extended default constructor, but seemingly
forgot to add an explicit overload with the corresponding constraint.
libstdc++-v3/ChangeLog:
PR libstdc++/114147
* include/std/tuple (tuple::tuple(allocator_arg_t, const Alloc&)):
Add missing overload of allocator-extended default constructor.
(tuple<T1,T2>::tuple(allocator_arg_t, const Alloc&)): Likewise.
* testsuite/20_util/tuple/cons/114147.cc: New test.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug libstdc++/114147] [11/12/13 Regression] tuple allocator-extended constructor requires non-explicit default constructor
2024-02-28 10:39 [Bug libstdc++/114147] New: tuple allocator-extended constructor requires non-explicit default constructor victor.dyachenko at protonmail dot com
` (7 preceding siblings ...)
2024-03-04 20:25 ` cvs-commit at gcc dot gnu.org
@ 2024-03-16 10:19 ` cvs-commit at gcc dot gnu.org
2024-03-18 14:03 ` [Bug libstdc++/114147] [11/12 " cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-03-16 10:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114147
--- Comment #9 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-13 branch has been updated by Jonathan Wakely
<redi@gcc.gnu.org>:
https://gcc.gnu.org/g:8a0a24b9a097452c576d5f409fe7efbafd6aef6b
commit r13-8457-g8a0a24b9a097452c576d5f409fe7efbafd6aef6b
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Fri Mar 1 11:16:58 2024 +0000
libstdc++: Add missing std::tuple constructor [PR114147]
I caused a regression with commit r10-908 by adding a constraint to the
non-explicit allocator-extended default constructor, but seemingly
forgot to add an explicit overload with the corresponding constraint.
libstdc++-v3/ChangeLog:
PR libstdc++/114147
* include/std/tuple (tuple::tuple(allocator_arg_t, const Alloc&)):
Add missing overload of allocator-extended default constructor.
(tuple<T1,T2>::tuple(allocator_arg_t, const Alloc&)): Likewise.
* testsuite/20_util/tuple/cons/114147.cc: New test.
(cherry picked from commit 0a545ac7000501844670add0b3560ebdbcb123c6)
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug libstdc++/114147] [11/12 Regression] tuple allocator-extended constructor requires non-explicit default constructor
2024-02-28 10:39 [Bug libstdc++/114147] New: tuple allocator-extended constructor requires non-explicit default constructor victor.dyachenko at protonmail dot com
` (8 preceding siblings ...)
2024-03-16 10:19 ` [Bug libstdc++/114147] [11/12/13 " cvs-commit at gcc dot gnu.org
@ 2024-03-18 14:03 ` cvs-commit at gcc dot gnu.org
2024-03-18 14:14 ` [Bug libstdc++/114147] [11 " redi at gcc dot gnu.org
` (2 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-03-18 14:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114147
--- Comment #10 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Jonathan Wakely
<redi@gcc.gnu.org>:
https://gcc.gnu.org/g:fbdeeb1604d52a8ece8631f70ecd64d925d31741
commit r12-10221-gfbdeeb1604d52a8ece8631f70ecd64d925d31741
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Fri Mar 1 11:16:58 2024 +0000
libstdc++: Add missing std::tuple constructor [PR114147]
I caused a regression with commit r10-908 by adding a constraint to the
non-explicit allocator-extended default constructor, but seemingly
forgot to add an explicit overload with the corresponding constraint.
libstdc++-v3/ChangeLog:
PR libstdc++/114147
* include/std/tuple (tuple::tuple(allocator_arg_t, const Alloc&)):
Add missing overload of allocator-extended default constructor.
(tuple<T1,T2>::tuple(allocator_arg_t, const Alloc&)): Likewise.
* testsuite/20_util/tuple/cons/114147.cc: New test.
(cherry picked from commit 0a545ac7000501844670add0b3560ebdbcb123c6)
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug libstdc++/114147] [11 Regression] tuple allocator-extended constructor requires non-explicit default constructor
2024-02-28 10:39 [Bug libstdc++/114147] New: tuple allocator-extended constructor requires non-explicit default constructor victor.dyachenko at protonmail dot com
` (9 preceding siblings ...)
2024-03-18 14:03 ` [Bug libstdc++/114147] [11/12 " cvs-commit at gcc dot gnu.org
@ 2024-03-18 14:14 ` redi at gcc dot gnu.org
2024-05-02 10:53 ` cvs-commit at gcc dot gnu.org
2024-05-02 10:54 ` redi at gcc dot gnu.org
12 siblings, 0 replies; 14+ messages in thread
From: redi at gcc dot gnu.org @ 2024-03-18 14:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114147
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[11/12 Regression] tuple |[11 Regression] tuple
|allocator-extended |allocator-extended
|constructor requires |constructor requires
|non-explicit default |non-explicit default
|constructor |constructor
--- Comment #11 from Jonathan Wakely <redi at gcc dot gnu.org> ---
backported for 13.3 and 12.4
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug libstdc++/114147] [11 Regression] tuple allocator-extended constructor requires non-explicit default constructor
2024-02-28 10:39 [Bug libstdc++/114147] New: tuple allocator-extended constructor requires non-explicit default constructor victor.dyachenko at protonmail dot com
` (10 preceding siblings ...)
2024-03-18 14:14 ` [Bug libstdc++/114147] [11 " redi at gcc dot gnu.org
@ 2024-05-02 10:53 ` cvs-commit at gcc dot gnu.org
2024-05-02 10:54 ` redi at gcc dot gnu.org
12 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-05-02 10:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114147
--- Comment #12 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Jonathan Wakely
<redi@gcc.gnu.org>:
https://gcc.gnu.org/g:0ecb0967b4f7e68027492ac03e5dc03b5bcfdcf7
commit r11-11411-g0ecb0967b4f7e68027492ac03e5dc03b5bcfdcf7
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Fri Mar 1 11:16:58 2024 +0000
libstdc++: Add missing std::tuple constructor [PR114147]
I caused a regression with commit r10-908 by adding a constraint to the
non-explicit allocator-extended default constructor, but seemingly
forgot to add an explicit overload with the corresponding constraint.
libstdc++-v3/ChangeLog:
PR libstdc++/114147
* include/std/tuple (tuple::tuple(allocator_arg_t, const Alloc&)):
Add missing overload of allocator-extended default constructor.
(tuple<T1,T2>::tuple(allocator_arg_t, const Alloc&)): Likewise.
* testsuite/20_util/tuple/cons/114147.cc: New test.
(cherry picked from commit 0a545ac7000501844670add0b3560ebdbcb123c6)
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug libstdc++/114147] [11 Regression] tuple allocator-extended constructor requires non-explicit default constructor
2024-02-28 10:39 [Bug libstdc++/114147] New: tuple allocator-extended constructor requires non-explicit default constructor victor.dyachenko at protonmail dot com
` (11 preceding siblings ...)
2024-05-02 10:53 ` cvs-commit at gcc dot gnu.org
@ 2024-05-02 10:54 ` redi at gcc dot gnu.org
12 siblings, 0 replies; 14+ messages in thread
From: redi at gcc dot gnu.org @ 2024-05-02 10:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114147
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #13 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Fixed for 11.5, 12.4, 13.3 and 14.1
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2024-05-02 10:54 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-28 10:39 [Bug libstdc++/114147] New: tuple allocator-extended constructor requires non-explicit default constructor victor.dyachenko at protonmail dot com
2024-02-28 10:48 ` [Bug libstdc++/114147] " victor.dyachenko at protonmail dot com
2024-02-28 11:18 ` victor.dyachenko at protonmail dot com
2024-02-28 11:21 ` [Bug libstdc++/114147] [10/11/12/13 Regression] " redi at gcc dot gnu.org
2024-02-28 13:49 ` [Bug libstdc++/114147] [11/12/13 " victor.dyachenko at protonmail dot com
2024-02-28 14:31 ` [Bug libstdc++/114147] [11/12/13/14 " redi at gcc dot gnu.org
2024-02-29 20:38 ` redi at gcc dot gnu.org
2024-03-01 15:12 ` redi at gcc dot gnu.org
2024-03-04 20:25 ` cvs-commit at gcc dot gnu.org
2024-03-16 10:19 ` [Bug libstdc++/114147] [11/12/13 " cvs-commit at gcc dot gnu.org
2024-03-18 14:03 ` [Bug libstdc++/114147] [11/12 " cvs-commit at gcc dot gnu.org
2024-03-18 14:14 ` [Bug libstdc++/114147] [11 " redi at gcc dot gnu.org
2024-05-02 10:53 ` cvs-commit at gcc dot gnu.org
2024-05-02 10:54 ` 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).