Boost C++ Libraries: Ticket #2494: compile errors in function_template.hpp when BOOST_NO_EXCEPTIONS defined https://svn.boost.org/trac10/ticket/2494 <p> This is on Boost 1.37.0 - there's no version for that at the moment in the Version pull down for submitting new bugs. </p> <p> /home/andyc/work/tiger/1/include/ppc_BOS/boost/function/detail/maybe_include.hpp:23, </p> <blockquote> <p> from /home/andyc/work/tiger/1/include/ppc_BOS/boost/function/function2.hpp:11, from /home/andyc/work/tiger/1/include/ppc_BOS/boost/signals/detail/named_slot_map.hpp:18, from libs/signals/src/named_slot_map.cpp:12: </p> </blockquote> <p> /home/andyc/work/tiger/1/include/ppc_BOS/boost/function/function_template.hpp:965: error: declaration of 'class R' /home/andyc/work/tiger/1/include/ppc_BOS/boost/function/function_template.hpp:652: error: shadows template parm 'class R' /home/andyc/work/tiger/1/include/ppc_BOS/boost/function/function_template.hpp:965: error: declaration of 'class T0' /home/andyc/work/tiger/1/include/ppc_BOS/boost/function/function_template.hpp:653: error: shadows template parm 'class T0' /home/andyc/work/tiger/1/include/ppc_BOS/boost/function/function_template.hpp:965: error: declaration of 'class T1' /home/andyc/work/tiger/1/include/ppc_BOS/boost/function/function_template.hpp:653: error: shadows template parm 'class T1' /home/andyc/work/tiger/1/include/ppc_BOS/boost/function/function_template.hpp:979: error: declaration of 'class R' /home/andyc/work/tiger/1/include/ppc_BOS/boost/function/function_template.hpp:652: error: shadows template parm 'class R' /home/andyc/work/tiger/1/include/ppc_BOS/boost/function/function_template.hpp:979: error: declaration of 'class T0' /home/andyc/work/tiger/1/include/ppc_BOS/boost/function/function_template.hpp:653: error: shadows template parm 'class T0' /home/andyc/work/tiger/1/include/ppc_BOS/boost/function/function_template.hpp:979: error: declaration of 'class T1' /home/andyc/work/tiger/1/include/ppc_BOS/boost/function/function_template.hpp:653: error: shadows template parm 'class T1' /home/andyc/work/tiger/1/include/ppc_BOS/boost/function/function_template.hpp:983: error: invalid use of incomplete type 'class boost::function2&lt;R, T0, T1&gt;' /home/andyc/work/tiger/1/include/ppc_BOS/boost/function/function_template.hpp:667: error: declaration of 'class boost::function2&lt;R, T0, T1&gt;' /home/andyc/work/tiger/1/include/ppc_BOS/boost/function/function_template.hpp:994: error: declaration of 'class R' /home/andyc/work/tiger/1/include/ppc_BOS/boost/function/function_template.hpp:652: error: shadows template parm 'class R' /home/andyc/work/tiger/1/include/ppc_BOS/boost/function/function_template.hpp:994: error: declaration of 'class T0' /home/andyc/work/tiger/1/include/ppc_BOS/boost/function/function_template.hpp:653: error: shadows template parm 'class T0' /home/andyc/work/tiger/1/include/ppc_BOS/boost/function/function_template.hpp:994: error: declaration of 'class T1' /home/andyc/work/tiger/1/include/ppc_BOS/boost/function/function_template.hpp:653: error: shadows template parm 'class T1' </p> <p> This patch fixes it: </p> <h5 class="section" id="boostfunctionfunction_template.hpp1.1vsedited">boost/function/function_template.hpp 1.1 vs edited</h5> <p> --- 1.1/boost/function/function_template.hpp 2008-11-06 09:48:36 +00:00 +++ edited/boost/function/function_template.hpp 2008-11-12 09:37:06 +00:00 @@ -950,10 +950,10 @@ </p> <blockquote> <p> f.vtable-&gt;manager(f.functor, this-&gt;functor, </p> <blockquote> <p> boost::detail::function::move_functor_tag); </p> </blockquote> <p> f.vtable = 0; </p> </blockquote> <p> -#if !defined(BOOST_NO_EXCEPTIONS) </p> <blockquote> <p> } else { </p> <blockquote> <p> clear(); </p> </blockquote> <p> } </p> </blockquote> <p> +#if !defined(BOOST_NO_EXCEPTIONS) </p> <blockquote> <p> } catch (...) { </p> <blockquote> <p> vtable = 0; throw; </p> </blockquote> </blockquote> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/2494 Trac 1.4.3 Marshall Clow Tue, 18 Nov 2008 01:03:07 GMT version, component changed; owner set https://svn.boost.org/trac10/ticket/2494#comment:1 https://svn.boost.org/trac10/ticket/2494#comment:1 <ul> <li><strong>owner</strong> set to <span class="trac-author">doug_gregor</span> </li> <li><strong>version</strong> <span class="trac-field-old">Boost 1.36.0</span> → <span class="trac-field-new">Boost 1.37.0</span> </li> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">function</span> </li> </ul> Ticket anonymous Wed, 24 Dec 2008 17:10:49 GMT <link>https://svn.boost.org/trac10/ticket/2494#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2494#comment:2</guid> <description> <p> dup of <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2469" title="#2469: Bugs: Build error in function_template.hpp if BOOST_NO_EXCEPTIONS is defined (closed: fixed)">#2469</a> and <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2499" title="#2499: Bugs: boost/function/function_template.hpp broken for -fno-exceptions. (closed: fixed)">#2499</a> </p> </description> <category>Ticket</category> </item> <item> <author>Ingmar Vanhassel <ingmar@…></author> <pubDate>Wed, 24 Dec 2008 17:42:42 GMT</pubDate> <title>cc set https://svn.boost.org/trac10/ticket/2494#comment:3 https://svn.boost.org/trac10/ticket/2494#comment:3 <ul> <li><strong>cc</strong> <span class="trac-author">ingmar@…</span> added </li> </ul> Ticket Douglas Gregor Fri, 13 Mar 2009 05:49:04 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/2494#comment:4 https://svn.boost.org/trac10/ticket/2494#comment:4 <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> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/51745" title="Make Boost.Function compile under BOOST_NO_EXCEPTIONS. Fixes #2499 ...">[51745]</a>) Make Boost.Function compile under BOOST_NO_EXCEPTIONS. </p> <p> Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2499" title="#2499: Bugs: boost/function/function_template.hpp broken for -fno-exceptions. (closed: fixed)">#2499</a> Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2494" title="#2494: Bugs: compile errors in function_template.hpp when BOOST_NO_EXCEPTIONS defined (closed: fixed)">#2494</a> Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2469" title="#2469: Bugs: Build error in function_template.hpp if BOOST_NO_EXCEPTIONS is defined (closed: fixed)">#2469</a> Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2466" title="#2466: Bugs: function_template.hpp uses exceptions even when BOOST_NO_EXCEPTIONS is ... (closed: fixed)">#2466</a> </p> Ticket Daniel James Wed, 08 Jul 2009 23:23:54 GMT <link>https://svn.boost.org/trac10/ticket/2494#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2494#comment:5</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/54824" title="Merge various function changes from trunk. Merged revisions ...">[54824]</a>) Merge various function changes from trunk. </p> <p> Merged revisions 49571,50064,51743,51745,53722,54616-54619 via svnmerge from <a class="ext-link" href="https://svn.boost.org/svn/boost/trunk"><span class="icon">​</span>https://svn.boost.org/svn/boost/trunk</a> </p> <p> ........ </p> <blockquote> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/49571" title="Both Sun and Pgi on Linux correctly put typeinfo into the std ...">r49571</a> | noel_belcourt | 2008-11-03 18:37:49 +0000 (Mon, 03 Nov 2008) | 9 lines </p> </blockquote> <p> </p> <blockquote> <p> Both Sun and Pgi on Linux correctly put typeinfo into the std namespace, but function_base keys off the BOOST_NO_EXCEPTION_STD_NAMESPACE macro instead of the BOOST_NO_STD_TYPEINFO macro. The attached patch changes function_base to use the typeinfo macro. Because eVC 4.2 doesn't put typeinfo into the std namespace, I need to define BOOST_NO_STD_TYPEINFO only for this eVC version. </p> </blockquote> <p> ........ </p> <blockquote> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/50064" title="Fix -Wundef warning and suspect usage of BOOST_STRICT_CONFIG.">r50064</a> | johnmaddock | 2008-12-02 10:10:46 +0000 (Tue, 02 Dec 2008) | 1 line </p> </blockquote> <p> </p> <blockquote> <p> Fix -Wundef warning and suspect usage of BOOST_STRICT_CONFIG. </p> </blockquote> <p> ........ </p> <blockquote> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/51743" title="Implement an optimization that David Abrahams and myself came up with, ...">r51743</a> | dgregor | 2009-03-13 05:23:53 +0000 (Fri, 13 Mar 2009) | 11 lines </p> </blockquote> <p> </p> <blockquote> <p> Implement an optimization that David Abrahams and myself came up with, where Boost.Function uses a bit in the vtable pointer to indicate when the target function object has a trivial copy constructor, trivial destructor, and fits within the small object buffer. In this case, we just copy the bits of the function object rather than performing an indirect call to the manager. </p> </blockquote> <p> </p> <blockquote> <p> This results in a 60% speedup on a micro-benchmark that copies and calls such function objects repeatedly. </p> </blockquote> <p> ........ </p> <blockquote> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/51745" title="Make Boost.Function compile under BOOST_NO_EXCEPTIONS. Fixes #2499 ...">r51745</a> | dgregor | 2009-03-13 05:49:02 +0000 (Fri, 13 Mar 2009) | 7 lines </p> </blockquote> <p> </p> <blockquote> <p> Make Boost.Function compile under BOOST_NO_EXCEPTIONS. </p> </blockquote> <p> </p> <blockquote> <p> Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2499" title="#2499: Bugs: boost/function/function_template.hpp broken for -fno-exceptions. (closed: fixed)">#2499</a> Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2494" title="#2494: Bugs: compile errors in function_template.hpp when BOOST_NO_EXCEPTIONS defined (closed: fixed)">#2494</a> Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2469" title="#2469: Bugs: Build error in function_template.hpp if BOOST_NO_EXCEPTIONS is defined (closed: fixed)">#2469</a> Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2466" title="#2466: Bugs: function_template.hpp uses exceptions even when BOOST_NO_EXCEPTIONS is ... (closed: fixed)">#2466</a> </p> </blockquote> <p> ........ </p> <blockquote> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/53722" title="Make Boost.Function compile with disabled exceptions. Closes #2900. ...">r53722</a> | vladimir_prus | 2009-06-07 16:44:50 +0100 (Sun, 07 Jun 2009) | 4 lines </p> </blockquote> <p> </p> <blockquote> <p> Make Boost.Function compile with disabled exceptions. </p> </blockquote> <p> </p> <blockquote> <p> Closes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2900" title="#2900: Bugs: Function Library does not compile with no excpetions (closed: fixed)">#2900</a>. Patch from Gabi Davar. </p> </blockquote> <p> ........ </p> <blockquote> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/54616" title="When copying boost::ref, copy even when the referenced function is ...">r54616</a> | danieljames | 2009-07-03 23:20:26 +0100 (Fri, 03 Jul 2009) | 3 lines </p> </blockquote> <p> </p> <blockquote> <p> When copying boost::ref, copy even when the referenced function is empty. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2642" title="#2642: Bugs: bug constructing from a reference to another boost::function (closed: fixed)">#2642</a> </p> </blockquote> <p> </p> <blockquote> <p> Patch by Steven Watanabe </p> </blockquote> <p> ........ </p> <blockquote> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/54617" title="Add 'and later versions' to support info for GCC and Visual C++. Fixes ...">r54617</a> | danieljames | 2009-07-03 23:20:52 +0100 (Fri, 03 Jul 2009) | 6 lines </p> </blockquote> <p> </p> <blockquote> <p> Add 'and later versions' to support info for GCC and Visual C++. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2847" title="#2847: Bugs: Additional compatible compilers for preferred syntax (closed: fixed)">#2847</a>. </p> </blockquote> <p> </p> <blockquote> <p> I didn't explicitly specify the versions since no one's updating this list and it's highly unlikely that a future version will break this. The same could probably be done for the other compilers but I don't know them very well so I'm leaving them alone. </p> </blockquote> <p> ........ </p> <blockquote> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/54618" title="Fix Boost.Function unit tests for C++0x. Fixes #3012 Based on a patch ...">r54618</a> | danieljames | 2009-07-03 23:21:40 +0100 (Fri, 03 Jul 2009) | 4 lines </p> </blockquote> <p> </p> <blockquote> <p> Fix Boost.Function unit tests for C++0x. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3012" title="#3012: Bugs: [function] Test failures with GCC 4.3/4.4 in C++0x mode (closed: fixed)">#3012</a> </p> </blockquote> <p> </p> <blockquote> <p> Based on a patch from Richard Webb. Changed a bit so that it also works for the Visual C++ 10 beta. </p> </blockquote> <p> ........ </p> <blockquote> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/54619" title="Work around Visual C++ copy constructor bug. Fixes #2929. Based on ...">r54619</a> | danieljames | 2009-07-03 23:22:03 +0100 (Fri, 03 Jul 2009) | 3 lines </p> </blockquote> <p> </p> <blockquote> <p> Work around Visual C++ copy constructor bug. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2929" title="#2929: Bugs: boost::function cause runtime stack overflow (closed: fixed)">#2929</a>. </p> </blockquote> <p> </p> <blockquote> <p> Based on the patch by Steven Watanabe. </p> </blockquote> <p> ........ </p> </description> <category>Ticket</category> </item> </channel> </rss>