<div dir="ltr">Members which are templates inside of local classes can still exist with my patch, they cannot be written explicitly though:<div><br></div><div>For example:</div><div>int fun() { auto L = [](const auto& x, auto& y){ return x + y; }; }<br>
<div class="gmail_extra"><br></div><div class="gmail_extra">Gives an -ast-dump with:</div><div class="gmail_extra"><div class="gmail_extra">`-FunctionDecl 0x6c8c480 <<stdin>:1:1, col:79> fun 'int (void)'</div>
<div>[...snip...]</div></div><div class="gmail_extra"><div class="gmail_extra">              |-CXXRecordDecl 0x6cd6490 <col:25> class definition</div><div><div>              | |-FunctionTemplateDecl 0x6cd6740 <<invalid sloc>, col:76> operator()</div>
</div><div><br></div><div>Given that this can still happen I am not eager to remove the code that made these constructs work better.</div><div><br></div><div>I am of the belief that if we choose to accept this particular extension, it should be explicitly OK'd in a draft or draft of a standard.  EDG, GCC and even MSVC all agree that this should not be permitted.  I suppose if we really want to support this feature, we should at least issue a diagnostic under -pedantic.</div>
<div><br></div><div>-- </div><div>David Majnemer</div><br><div class="gmail_quote">On Wed, Oct 9, 2013 at 1:19 AM, Yunzhong Gao <span dir="ltr"><<a href="mailto:Yunzhong_Gao@playstation.sony.com" target="_blank">Yunzhong_Gao@playstation.sony.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><br>
  This is essentially the same implementation as what I proposed a few weeks ago,<br>
  <a href="http://llvm-reviews.chandlerc.com/D575" target="_blank">http://llvm-reviews.chandlerc.com/D575</a>.<br>
  On that review, I was waiting to hear from Faisal who has started adding support<br>
  for local member templates to clang, and I am not sure if he needs this support<br>
  for any language extensions.<br>
<br>
  I feel that it is wrong to just remove tests without also removing relevant compiler<br>
  changes, because that leaves a feature in the compiler without any tests. e.g.,<br>
  If one wants to remove the following two tests, he/she should either revert r184903<br>
  or write some different tests.<br>
  test/PCH/cxx-local-templates.cpp<br>
  test/PCH/cxx1y-local-templates.cpp<br>
<br>
<a href="http://llvm-reviews.chandlerc.com/D1866" target="_blank">http://llvm-reviews.chandlerc.com/D1866</a><br>
</blockquote></div><br></div></div></div>