<div dir="ltr">Looks like there is a FIXME about this (test/SemaCXX/implicit-exception-spec.cpp):<div><br><div><div>namespace ExceptionSpecification {</div><div>  // FIXME: This diagnostic is quite useless; we should indicate whose</div><div>  // exception specification we were looking for and why.</div><div>  struct Nested {</div><div>    struct T {</div><div>      T() noexcept(!noexcept(Nested()));</div><div>    } t; // expected-error{{exception specification is not available until end of class definition}}</div><div>  };</div><div>}</div></div></div><div><br></div><div>The offending code is in Sema::ResolveExceptionSpec in lib/Sema/SemaExceptionSpec.cpp</div><div><br></div><div>-- Sean Silva</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 30, 2014 at 6:26 AM, Richtarsky, Martin <span dir="ltr"><<a href="mailto:martin.richtarsky@sap.com" target="_blank">martin.richtarsky@sap.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
with clang trunk I'm getting an error here:<br>
<br>
$ cat except-spec.cpp<br>
////<br>
class Thread<br>
{<br>
public:<br>
    virtual ~Thread();<br>
};<br>
<br>
class NetworkProfilerThread : public Thread<br>
{<br>
public:<br>
    //virtual ~NetworkProfilerThread();  // makes it work<br>
    //~NetworkProfilerThread();          // makes it work<br>
    struct OutputFileName<br>
    {<br>
        virtual ~OutputFileName() throw() { };<br>
<br>
    } m_OutputConfig;<br>
};<br>
////<br>
<br>
except-spec.cpp:17:7: error: exception specification is not available until end of class definition<br>
    } m_OutputConfig;<br>
      ^<br>
1 error generated.<br>
<br>
Uncommenting one of the "makes it work" lines and thus declaring the destructor gets rid of the error. I don't know enough about the standard to say whether this is expected, but at least the error is quite cryptic and cost me some experimenting to find out the problem.<br>
<br>
Opinions?<br>
<br>
Best regards,<br>
Martin<br>
<br>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
</blockquote></div><br></div>