Boost C++ Libraries: Ticket #4344: [helper1.cpp] Please consider a qualified call to boost::enable_error_info https://svn.boost.org/trac10/ticket/4344 <p> <a class="ext-link" href="https://svn.boost.org/trac/boost/browser/trunk/libs/exception/test/helper1.cpp?rev=52227"><span class="icon">​</span>exception/test/helper1.cpp</a> has an unqualified call to enable_error_info: </p> <pre class="wiki">throw enable_error_info( std::length_error("exception test length error") ); </pre><p> Because the namespace is unspecified, the compiler has to look into the global namespace, boost, boost::exception_test, and the namespace(s) associated with its argument (ADL), in order to find the best match for the enable_error_info function call. </p> <p> Is the function enable_error_info really meant to be customizable that way, by allowing to add an overload of enable_error_info to one of the namespaces associated with its argument? Otherwise I think it's preferable to do a qualified call to boost::enable_error_info: </p> <pre class="wiki">throw boost::enable_error_info( std::length_error("exception test length error") ); </pre><p> This little modification would also make it easier to get enable_error_info_test compiling on Codegear. Your unqualified function call triggers an internal compiler error, as I just reported to Embarcadero: <a class="ext-link" href="http://qc.embarcadero.com/wc/qcmain.aspx?d=85444"><span class="icon">​</span>http://qc.embarcadero.com/wc/qcmain.aspx?d=85444</a> </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/4344 Trac 1.4.3 niels_dekker Wed, 16 Jun 2010 18:42:56 GMT attachment set https://svn.boost.org/trac10/ticket/4344 https://svn.boost.org/trac10/ticket/4344 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">helper1_cpp_qualified_call_to_boost_enable_error_info.patch</span> </li> </ul> <p> helper1.cpp qualified call to boost::enable_error_info </p> Ticket niels_dekker Wed, 16 Jun 2010 18:46:31 GMT type changed https://svn.boost.org/trac10/ticket/4344#comment:1 https://svn.boost.org/trac10/ticket/4344#comment:1 <ul> <li><strong>type</strong> <span class="trac-field-old">Bugs</span> → <span class="trac-field-new">Patches</span> </li> </ul> <p> Hi Emil, </p> <p> Is it okay to you if I commit the attached patch to the trunk? <a class="ext-link" href="https://svn.boost.org/trac/boost/attachment/ticket/4344/helper1_cpp_qualified_call_to_boost_enable_error_info.patch"><span class="icon">​</span>https://svn.boost.org/trac/boost/attachment/ticket/4344/helper1_cpp_qualified_call_to_boost_enable_error_info.patch</a> </p> <p> -- Niels </p> Ticket Emil Dotchevski Thu, 09 Dec 2010 06:40:52 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/4344#comment:2 https://svn.boost.org/trac10/ticket/4344#comment:2 <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> Done, release branch revision <a class="missing ticket">#67128</a> </p> Ticket niels_dekker Thu, 09 Dec 2010 13:33:01 GMT <link>https://svn.boost.org/trac10/ticket/4344#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4344#comment:3</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/4344#comment:2" title="Comment 2">emildotchevski</a>: </p> <blockquote class="citation"> <p> Done, release branch revision <a class="missing ticket">#67128</a> </p> </blockquote> <p> Hi Emil, </p> <p> Thanks for <a class="changeset" href="https://svn.boost.org/trac10/changeset/67128" title="Ticket #4344">[67128]</a> but my patch is about the trunk version of helper1.cpp Why don't you apply the patch to that specific file? The unqualified enable_error_info call is still there at <a class="ext-link" href="https://svn.boost.org/svn/boost/trunk/libs/exception/test/helper1.cpp"><span class="icon">​</span>https://svn.boost.org/svn/boost/trunk/libs/exception/test/helper1.cpp</a> </p> </description> <category>Ticket</category> </item> </channel> </rss>