Boost C++ Libraries: Ticket #10530: Attempting to define own lexical cast on solaris has to use deprected method https://svn.boost.org/trac10/ticket/10530 <p> In version 1.41 of boost, it was possible to do (eg this) </p> <blockquote> <p> namespace boost { </p> <blockquote> <p> template &lt;&gt; bool lexical_cast(std::string const &amp;s) { ... }; </p> </blockquote> <p> } </p> </blockquote> <p> In 1.55 this stopped working on sun workshop compiler (Studio 12, version 5.12) saying 'can't find definition in namespace'. </p> <p> I've had to revert to the deprecated pass-by-value declaration but I can't find any documentation that indicates that this is necessary or why it might have changed. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/10530 Trac 1.4.3 Antony Polukhin Wed, 24 Sep 2014 11:57:28 GMT <link>https://svn.boost.org/trac10/ticket/10530#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10530#comment:1</guid> <description> <p> Hmmm, your code still works on GCC 4.6.4: </p> <pre class="wiki">#include &lt;iostream&gt; #include &lt;boost/lexical_cast.hpp&gt; namespace boost { template &lt;&gt; bool lexical_cast(std::string const &amp;s) { return true; }; } int main() { std::cout &lt;&lt; boost::lexical_cast&lt;bool&gt;(std::string("Foo")); return 0; } </pre><p> This makes me think that the problem is related only to the Sun Studio 5.12 compiler. There are no <a href="http://www.boost.org/development/tests/develop/developer/lexical_cast.html">regression testers</a> that currently run the tests on Sun Studio. Two years ago was the last time I saw someone running regression tests on Sun Studio compiler (the compiler was not good because of big problems with partial specializations). </p> <p> Unfortunately it is impossible for me to solve your issue while there's no regression tester. If you're willing to become one of the testers, take a look at <a href="http://www.boost.org/development/running_regression_tests.html">this page, section "Running Boost's Automated Regression and Reporting"</a>. Running those tests on Sun Studio will help the Boost developers to solve many of the issues that you may have all around the Boost libraries. </p> <p> Or, if you have a working solution for this issue, then you can make a pull request with fix to the official <a class="ext-link" href="https://github.com/boostorg/lexical_cast/tree/develop"><span class="icon">​</span>lexical cast repo</a>. Or just attach patch to this ticket. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Antony Polukhin</dc:creator> <pubDate>Wed, 18 Jan 2017 19:49:20 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/10530#comment:2 https://svn.boost.org/trac10/ticket/10530#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">obsolete</span> </li> </ul> Ticket