<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Jan 25, 2018 at 7:35 AM, Gabriel Charette <span dir="ltr"><<a href="mailto:gab@chromium.org" target="_blank">gab@chromium.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><br><br><div class="gmail_quote"><span class="gmail-"><div dir="ltr">On Thu, Jan 25, 2018 at 4:32 PM James Dennett <<a href="mailto:james.dennett@gmail.com" target="_blank">james.dennett@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Jan 25, 2018 at 4:11 AM, Gabriel Charette via cfe-dev <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" class="gmail-m_-2120650768135225040cremed" target="_blank">cfe-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hello Clang/C++ experts!</div><div><br></div><div>I'm confused on what it takes to be std::is_trivial_default_<wbr>constructible?</div></div></blockquote><div><br></div></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>To be trivially default constructible means to be default constructible *without doing anything*.</div></div></div></div></blockquote><div><br></div></span><div>Right... What I want is way to tell if the compiler will evaluate this at compile-time (e.g. to guarantee no static initializer for globals of trivial types with only zero-initialized POD members).</div></div></div></blockquote><div><br></div><div>`constexpr` (or the [[clang::require_constant_initialization]] attribute) is what you want to ensure compile-time initialization.  Happily it can do a lot more than zero-initialization.</div><div><br></div><div>-- James</div><div><br></div><div>p.s. This isn't really the right list for general questions about C++.</div></div></div></div>