public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/109623] New: constexpr restrictions are not relaxed enough
@ 2023-04-25 16:36 oleksandr.koval.dev at gmail dot com
2023-04-25 17:14 ` [Bug c++/109623] " redi at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: oleksandr.koval.dev at gmail dot com @ 2023-04-25 16:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109623
Bug ID: 109623
Summary: constexpr restrictions are not relaxed enough
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: oleksandr.koval.dev at gmail dot com
Target Milestone: ---
https://godbolt.org/z/eo8K3Ehqq
```cpp
#include <unordered_map>
struct S{
constexpr S() = default; // error, not implicitly constexpr
constexpr S(){} // this works
std::unordered_map<int, int> m;
};
```
My understanding is that in C++23 this should be allowed because the only
restriction for constexpr constructors and destructors is the absence of
virtual base classes.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/109623] constexpr restrictions are not relaxed enough
2023-04-25 16:36 [Bug c++/109623] New: constexpr restrictions are not relaxed enough oleksandr.koval.dev at gmail dot com
@ 2023-04-25 17:14 ` redi at gcc dot gnu.org
2023-04-27 16:11 ` mpolacek at gcc dot gnu.org
2023-05-16 18:26 ` mpolacek at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: redi at gcc dot gnu.org @ 2023-04-25 17:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109623
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mpolacek at gcc dot gnu.org
See Also| |https://gcc.gnu.org/bugzill
| |a/show_bug.cgi?id=106649
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
I think this shoulda been done for Bug 106649, IIUC
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/109623] constexpr restrictions are not relaxed enough
2023-04-25 16:36 [Bug c++/109623] New: constexpr restrictions are not relaxed enough oleksandr.koval.dev at gmail dot com
2023-04-25 17:14 ` [Bug c++/109623] " redi at gcc dot gnu.org
@ 2023-04-27 16:11 ` mpolacek at gcc dot gnu.org
2023-05-16 18:26 ` mpolacek at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2023-04-27 16:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109623
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2023-04-27
Ever confirmed|0 |1
Status|UNCONFIRMED |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |mpolacek at gcc dot gnu.org
--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Most likely, mine thus.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/109623] constexpr restrictions are not relaxed enough
2023-04-25 16:36 [Bug c++/109623] New: constexpr restrictions are not relaxed enough oleksandr.koval.dev at gmail dot com
2023-04-25 17:14 ` [Bug c++/109623] " redi at gcc dot gnu.org
2023-04-27 16:11 ` mpolacek at gcc dot gnu.org
@ 2023-05-16 18:26 ` mpolacek at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2023-05-16 18:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109623
--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
// PR c++/109623
struct U {
U() { }
};
struct S {
constexpr S() = default;
U u;
};
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-05-16 18:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-25 16:36 [Bug c++/109623] New: constexpr restrictions are not relaxed enough oleksandr.koval.dev at gmail dot com
2023-04-25 17:14 ` [Bug c++/109623] " redi at gcc dot gnu.org
2023-04-27 16:11 ` mpolacek at gcc dot gnu.org
2023-05-16 18:26 ` mpolacek 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).