Boost C++ Libraries: Ticket #3983: catch reference to incomplete type in signals2 https://svn.boost.org/trac10/ticket/3983 <p> In boost/signals2/last_value.hpp reference to incomplete type boost::signals2::expired_slot is catched. </p> <p> The following code don't compile with comeau and clang: </p> <p> struct T; </p> <p> template &lt;typename U&gt; void f() { </p> <blockquote> <p> try {} catch(T const &amp;) {} </p> </blockquote> <p> } </p> <p> struct T {}; </p> <p> int main() { </p> <blockquote> <p> f&lt;int&gt;(); return 0; </p> </blockquote> <p> } </p> <p> With error message: </p> <p> 7.cpp:9:19: error: cannot catch reference to incomplete type 'struct T const' </p> <blockquote> <p> catch(T const &amp;) </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/3983 Trac 1.4.3 sorokin@… Sun, 07 Mar 2010 23:15:33 GMT <link>https://svn.boost.org/trac10/ticket/3983#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3983#comment:1</guid> <description> <p> 15.3 Handling an exception [except.handle] 1 The exception-declaration in a handler describes the type(s) of exceptions that can cause that handler to be entered. The exception-declaration shall not denote an incomplete type or an rvalue reference type. The exception-declaration shall not denote a pointer or reference to an incomplete type, other than void*, const void*, volatile void*, or const volatile void*. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Frank Mori Hess</dc:creator> <pubDate>Tue, 09 Mar 2010 17:01:47 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/3983#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3983#comment:2</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/60383" title="Fixed standard violations where I caught incomplete types. Refs #3983. ">[60383]</a>) Fixed standard violations where I caught incomplete types. Refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3983" title="#3983: Bugs: catch reference to incomplete type in signals2 (closed: fixed)">#3983</a>. </p> </description> <category>Ticket</category> </item> <item> <author>sorokin@…</author> <pubDate>Tue, 09 Mar 2010 20:29:27 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/3983#comment:3 https://svn.boost.org/trac10/ticket/3983#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> I've tried new version from thunk. Everything works correct. Thanks a lot! </p> <p> As the bug is fixed I close this ticket. </p> Ticket Frank Mori Hess Wed, 10 Mar 2010 15:56:42 GMT <link>https://svn.boost.org/trac10/ticket/3983#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3983#comment:4</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/60426" title="Merged [60383] to release branch. Fixes #3983. ">[60426]</a>) Merged <a class="changeset" href="https://svn.boost.org/trac10/changeset/60383" title="Fixed standard violations where I caught incomplete types. Refs #3983. ">[60383]</a> to release branch. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3983" title="#3983: Bugs: catch reference to incomplete type in signals2 (closed: fixed)">#3983</a>. </p> </description> <category>Ticket</category> </item> </channel> </rss>