<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, May 12, 2014 at 5:09 PM, Reid Kleckner <span dir="ltr"><<a href="mailto:rnk@google.com" target="_blank">rnk@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Hm, this approach fails quickly when I try to compile some simple programs.  This program doesn't declare any special members:<div><div>struct S { int a; };</div><div>void foo(S s) { }</div></div></div>
</blockquote><div><br></div><div>You should be able handle this by using hasTrivialCopyConstructor and hasTrivialMoveConstructor to check if the class has a (possibly not-yet-declared) trivial copy or move constructor, under the same assumption you're already making (if there is a trivial operation that's not yet declared, it would not be deleted).</div>
</div></div></div>