public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* 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

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).