* gcc bug? constinit does not require constexpr ctor
@ 2019-10-10 4:54 Klaus Doldinger
2019-10-10 12:37 ` Klaus Doldinger
0 siblings, 1 reply; 2+ messages in thread
From: Klaus Doldinger @ 2019-10-10 4:54 UTC (permalink / raw)
To: gcc-help
Hi all,
simple question: should in the following example the constinit case be
also impossible if the required ctor is not constexpr?
struct B {
/*constexpr*/ B() {}
};
struct A {
constexpr static inline B b2{}; // not possible
constinit static inline B b1{}; // should this NOT possible either?
};
int main() {
A a;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: gcc bug? constinit does not require constexpr ctor
2019-10-10 4:54 gcc bug? constinit does not require constexpr ctor Klaus Doldinger
@ 2019-10-10 12:37 ` Klaus Doldinger
0 siblings, 0 replies; 2+ messages in thread
From: Klaus Doldinger @ 2019-10-10 12:37 UTC (permalink / raw)
To: gcc-help
To answer my question myself: actually fixed in gcc-trunk.
Am 10.10.19 um 06:53 schrieb Klaus Doldinger:
> Hi all,
>
> simple question: should in the following example the constinit case be
> also impossible if the required ctor is not constexpr?
>
> struct B {
> /*constexpr*/ B() {}
> };
>
> struct A {
> constexpr static inline B b2{}; // not possible
> constinit static inline B b1{}; // should this NOT possible either?
> };
>
> int main() {
> A a;
> }
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-10-10 12:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-10 4:54 gcc bug? constinit does not require constexpr ctor Klaus Doldinger
2019-10-10 12:37 ` Klaus Doldinger
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).