<div dir="ltr">Sorry the semicolon is missing at the end of class definition but it doesn't change the result. </div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 5, 2016 at 4:45 PM, Han Wang <span dir="ltr"><<a href="mailto:wanghan02@gmail.com" target="_blank">wanghan02@gmail.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">Hi, <div><br></div><div>Let's say we have a simple template method with ref-qualification and noexcept. </div><div><br></div><div><div><font face="monospace, monospace">struct A {</font></div><div><font face="monospace, monospace"> template <typename T></font></div><div><font face="monospace, monospace"> void foo(T&& t) & noexcept {</font></div><div><font face="monospace, monospace"> DoSomething(); </font></div><div><font face="monospace, monospace"> DoSomethingElse();</font></div><div><font face="monospace, monospace"> }</font></div><div><font face="monospace, monospace">}</font></div></div><div><br></div><div>If we use clang-format to re-format the code with google style (or llvm or other styles), we get</div><div><br></div><div><div><font face="monospace, monospace">struct A {</font></div><div><font face="monospace, monospace"> template <typename T></font></div><div><font face="monospace, monospace"> void foo(T&& t) & noexcept {</font></div><div><font face="monospace, monospace"> DoSomething();</font></div><div><font face="monospace, monospace"> DoSomethingElse();</font></div><div><font face="monospace, monospace"> }</font></div><div><font face="monospace, monospace">}</font></div></div><div><br></div><div>If we remove the noexcept or if we put a const before ref-qualification the reformat will work correctly. </div><div><br></div><div><br></div><div><br></div></div>
</blockquote></div><br></div>