Boost C++ Libraries: Ticket #6462: lexical_cast fails on Linux with Sun CC https://svn.boost.org/trac10/ticket/6462 <p> Lexical cast fails to build with sun's compiler on Linux: </p> <pre class="wiki">sun.compile.c++ /home/john/bin/boost/bin.v2/libs/numeric/conversion/test/bounds_test.test/sun-12.1/debug/stdlib-sun-stlport/bounds_test.o "../../../../boost/test/tree/test_case_counter.hpp", line 46: Warning: boost::unit_test::test_case_counter::visit hides the virtual function boost::unit_test::test_tree_visitor::visit(const boost::unit_test::test_unit&amp;). "../../../../boost/test/impl/framework.ipp", line 200: Warning: boost::unit_test::ut_detail::name_filter::visit hides the virtual function boost::unit_test::test_tree_visitor::visit(const boost::unit_test::test_unit&amp;). "../../../../boost/test/impl/framework.ipp", line 229: Warning: boost::unit_test::ut_detail::label_filter::visit hides the virtual function boost::unit_test::test_tree_visitor::visit(const boost::unit_test::test_case&amp;). "../../../../boost/test/impl/framework.ipp", line 258: Warning: boost::unit_test::ut_detail::change_status::visit hides the virtual function boost::unit_test::test_tree_visitor::visit(const boost::unit_test::test_case&amp;). "../../../../boost/test/impl/framework.ipp", line 314: Warning: boost::unit_test::ut_detail::remove_disabled::visit hides the virtual function boost::unit_test::test_tree_visitor::visit(const boost::unit_test::test_case&amp;). "../../../../boost/test/impl/framework.ipp", line 477: Warning: boost::unit_test::framework_impl::visit hides the virtual function boost::unit_test::test_tree_visitor::visit(const boost::unit_test::test_unit&amp;). "../../../../boost/test/impl/framework.ipp", line 601: Warning: collect_disabled::visit hides the virtual function boost::unit_test::test_tree_visitor::visit(const boost::unit_test::test_case&amp;). "../../../../boost/test/impl/framework.ipp", line 690: Warning: apply_decorators::visit hides the virtual function boost::unit_test::test_tree_visitor::visit(const boost::unit_test::test_case&amp;). "../../../../boost/test/impl/results_collector.ipp", line 202: Warning: boost::unit_test::results_collect_helper::visit hides the virtual function boost::unit_test::test_tree_visitor::visit(const boost::unit_test::test_unit&amp;). "../../../../boost/test/impl/results_reporter.ipp", line 90: Warning:::results_reporter_impl::visit hides the virtual function boost::unit_test::test_tree_visitor::visit(const boost::unit_test::test_unit&amp;). "../../../../boost/test/impl/unit_test_main.ipp", line 73: Warning: boost::unit_test::ut_detail::test_tree_reporter::visit hides the virtual function boost::unit_test::test_tree_visitor::visit(const boost::unit_test::test_unit&amp;). "../../../../boost/lexical_cast.hpp", line 1845: Error: Ambiguous partial specialization for boost::detail::stream_char&lt;std::string&gt;, boost::detail::stream_char&lt;boost::container::basic_string&lt;boost::detail::CharT, boost::detail::Traits, boost::detail::Alloc&gt;&gt; and boost::detail::stream_char&lt;std::basic_string&lt;boost::detail::CharT, boost::detail::Traits, boost::detail::Alloc&gt;&gt;. "../../../../boost/lexical_cast.hpp", line 2060: Where: While instantiating "static boost::detail::lexical_cast_do_cast&lt;long, std::string&gt;::lexical_cast_impl(const std::string &amp;)". "../../../../boost/lexical_cast.hpp", line 2060: Where: Instantiated from non-template code. "../../../../boost/lexical_cast.hpp", line 1846: Error: Ambiguous partial specialization for boost::detail::stream_char&lt;std::string&gt;, boost::detail::stream_char&lt;boost::container::basic_string&lt;boost::detail::CharT, boost::detail::Traits, boost::detail::Alloc&gt;&gt; and boost::detail::stream_char&lt;std::basic_string&lt;boost::detail::CharT, boost::detail::Traits, boost::detail::Alloc&gt;&gt;. "../../../../boost/lexical_cast.hpp", line 2060: Where: While instantiating "static boost::detail::lexical_cast_do_cast&lt;long, std::string&gt;::lexical_cast_impl(const std::string &amp;)". "../../../../boost/lexical_cast.hpp", line 2060: Where: Instantiated from non-template code. "../../../../boost/lexical_cast.hpp", line 1854: Error: Ambiguous partial specialization for boost::detail::deduce_char_traits&lt;char, long, std::string&gt;, boost::detail::deduce_char_traits&lt;boost::detail::CharT, boost::detail::Target, boost::container::basic_string&lt;boost::detail::CharT, boost::detail::Traits, boost::detail::Alloc&gt;&gt; and boost::detail::deduce_char_traits&lt;boost::detail::CharT, boost::detail::Target, std::basic_string&lt;boost::detail::CharT, boost::detail::Traits, boost::detail::Alloc&gt;&gt;. "../../../../boost/lexical_cast.hpp", line 2060: Where: While instantiating "static boost::detail::lexical_cast_do_cast&lt;long, std::string&gt;::lexical_cast_impl(const std::string &amp;)". "../../../../boost/lexical_cast.hpp", line 2060: Where: Instantiated from non-template code. "../../../../boost/lexical_cast.hpp", line 1854: Error: Ambiguous partial specialization for boost::detail::deduce_char_traits&lt;char, long, std::string&gt;, boost::detail::deduce_char_traits&lt;boost::detail::CharT, boost::detail::Target, boost::container::basic_string&lt;boost::detail::CharT, boost::detail::Traits, boost::detail::Alloc&gt;&gt; and boost::detail::deduce_char_traits&lt;boost::detail::CharT, boost::detail::Target, std::basic_string&lt;boost::detail::CharT, boost::detail::Traits, boost::detail::Alloc&gt;&gt;. "../../../../boost/lexical_cast.hpp", line 2060: Where: While instantiating "static boost::detail::lexical_cast_do_cast&lt;long, std::string&gt;::lexical_cast_impl(const std::string &amp;)". "../../../../boost/lexical_cast.hpp", line 2060: Where: Instantiated from non-template code. "../../../../boost/lexical_cast.hpp", line 1878: Error: Ambiguous partial specialization for boost::detail::is_stdstring&lt;std::string&gt;, boost::detail::is_stdstring&lt;boost::container::basic_string&lt;boost::detail::CharT, boost::detail::Traits, boost::detail::Alloc&gt;&gt; and boost::detail::is_stdstring&lt;std::basic_string&lt;boost::detail::CharT, boost::detail::Traits, boost::detail::Alloc&gt;&gt;. "../../../../boost/lexical_cast.hpp", line 2060: Where: While instantiating "static boost::detail::lexical_cast_do_cast&lt;long, std::string&gt;::lexical_cast_impl(const std::string &amp;)". "../../../../boost/lexical_cast.hpp", line 2060: Where: Instantiated from non-template code. 5 Error(s) and 11 Warning(s) detected. </pre><p> For reasons I don't understand it can't cope with partial specializations for both std::basic_string and boost::container::basic_string. Commenting out the latter fixes the issue BTW (there are quite a few traits class specialisations that need to be commented out though!). </p> <p> Not sure if this is a general STLPort issue (don't see why it should be), or a specific compiler issue. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/6462 Trac 1.4.3 John Maddock Sun, 29 Jan 2012 17:57:19 GMT owner changed https://svn.boost.org/trac10/ticket/6462#comment:1 https://svn.boost.org/trac10/ticket/6462#comment:1 <ul> <li><strong>owner</strong> changed from <span class="trac-author">nasonov</span> to <span class="trac-author">Antony Polukhin</span> </li> </ul> Ticket Antony Polukhin Wed, 01 Feb 2012 04:28:28 GMT <link>https://svn.boost.org/trac10/ticket/6462#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6462#comment:2</guid> <description> <p> Looks like a duplicate for <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/6453" title="#6453: Bugs: Compile error due to `deduce_char_traits` ambiguity (closed: fixed)">#6453</a><br /> Try again the trunk version. error must be already fixed. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Wed, 01 Feb 2012 09:40:17 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/6462#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6462#comment:3</guid> <description> <p> Hope with current Trunk I stll see: </p> <pre class="wiki"> sun.compile.c++ /home/john/bin/boost/bin.v2/libs/numeric/conversion/test/bounds_test.test/sun-12.1/debug/stdlib-sun-stlport/bounds_test.o "../../../../boost/test/tree/test_case_counter.hpp", line 46: Warning: boost::unit_test::test_case_counter::visit hides the virtual function boost::unit_test::test_tree_visitor::visit(const boost::unit_test::test_unit&amp;). "../../../../boost/test/impl/framework.ipp", line 200: Warning: boost::unit_test::ut_detail::name_filter::visit hides the virtual function boost::unit_test::test_tree_visitor::visit(const boost::unit_test::test_unit&amp;). "../../../../boost/test/impl/framework.ipp", line 229: Warning: boost::unit_test::ut_detail::label_filter::visit hides the virtual function boost::unit_test::test_tree_visitor::visit(const boost::unit_test::test_case&amp;). "../../../../boost/test/impl/framework.ipp", line 258: Warning: boost::unit_test::ut_detail::change_status::visit hides the virtual function boost::unit_test::test_tree_visitor::visit(const boost::unit_test::test_case&amp;). "../../../../boost/test/impl/framework.ipp", line 314: Warning: boost::unit_test::ut_detail::remove_disabled::visit hides the virtual function boost::unit_test::test_tree_visitor::visit(const boost::unit_test::test_case&amp;). "../../../../boost/test/impl/framework.ipp", line 477: Warning: boost::unit_test::framework_impl::visit hides the virtual function boost::unit_test::test_tree_visitor::visit(const boost::unit_test::test_unit&amp;). "../../../../boost/test/impl/framework.ipp", line 601: Warning: collect_disabled::visit hides the virtual function boost::unit_test::test_tree_visitor::visit(const boost::unit_test::test_case&amp;). "../../../../boost/test/impl/framework.ipp", line 690: Warning: apply_decorators::visit hides the virtual function boost::unit_test::test_tree_visitor::visit(const boost::unit_test::test_case&amp;). "../../../../boost/test/impl/results_collector.ipp", line 202: Warning: boost::unit_test::results_collect_helper::visit hides the virtual function boost::unit_test::test_tree_visitor::visit(const boost::unit_test::test_unit&amp;). "../../../../boost/test/impl/results_reporter.ipp", line 90: Warning:::results_reporter_impl::visit hides the virtual function boost::unit_test::test_tree_visitor::visit(const boost::unit_test::test_unit&amp;). "../../../../boost/test/impl/unit_test_main.ipp", line 73: Warning: boost::unit_test::ut_detail::test_tree_reporter::visit hides the virtual function boost::unit_test::test_tree_visitor::visit(const boost::unit_test::test_unit&amp;). "../../../../boost/lexical_cast.hpp", line 1863: Error: Ambiguous partial specialization for boost::detail::stream_char&lt;std::string&gt;, boost::detail::stream_char&lt;boost::container::basic_string&lt;boost::detail::CharT, boost::detail::Traits, boost::detail::Alloc&gt;&gt; and boost::detail::stream_char&lt;std::basic_string&lt;boost::detail::CharT, boost::detail::Traits, boost::detail::Alloc&gt;&gt;. "../../../../boost/lexical_cast.hpp", line 2078: Where: While instantiating "static boost::detail::lexical_cast_do_cast&lt;long, std::string&gt;::lexical_cast_impl(const std::string &amp;)". "../../../../boost/lexical_cast.hpp", line 2078: Where: Instantiated from non-template code. "../../../../boost/lexical_cast.hpp", line 1864: Error: Ambiguous partial specialization for boost::detail::stream_char&lt;std::string&gt;, boost::detail::stream_char&lt;boost::container::basic_string&lt;boost::detail::CharT, boost::detail::Traits, boost::detail::Alloc&gt;&gt; and boost::detail::stream_char&lt;std::basic_string&lt;boost::detail::CharT, boost::detail::Traits, boost::detail::Alloc&gt;&gt;. "../../../../boost/lexical_cast.hpp", line 2078: Where: While instantiating "static boost::detail::lexical_cast_do_cast&lt;long, std::string&gt;::lexical_cast_impl(const std::string &amp;)". "../../../../boost/lexical_cast.hpp", line 2078: Where: Instantiated from non-template code. "../../../../boost/lexical_cast.hpp", line 1872: Error: Ambiguous partial specialization for boost::detail::deduce_char_traits&lt;char, long, std::string&gt;, boost::detail::deduce_char_traits&lt;boost::detail::CharT, boost::detail::Target, boost::container::basic_string&lt;boost::detail::CharT, boost::detail::Traits, boost::detail::Alloc&gt;&gt; and boost::detail::deduce_char_traits&lt;boost::detail::CharT, boost::detail::Target, std::basic_string&lt;boost::detail::CharT, boost::detail::Traits, boost::detail::Alloc&gt;&gt;. "../../../../boost/lexical_cast.hpp", line 2078: Where: While instantiating "static boost::detail::lexical_cast_do_cast&lt;long, std::string&gt;::lexical_cast_impl(const std::string &amp;)". "../../../../boost/lexical_cast.hpp", line 2078: Where: Instantiated from non-template code. "../../../../boost/lexical_cast.hpp", line 1872: Error: Ambiguous partial specialization for boost::detail::deduce_char_traits&lt;char, long, std::string&gt;, boost::detail::deduce_char_traits&lt;boost::detail::CharT, boost::detail::Target, boost::container::basic_string&lt;boost::detail::CharT, boost::detail::Traits, boost::detail::Alloc&gt;&gt; and boost::detail::deduce_char_traits&lt;boost::detail::CharT, boost::detail::Target, std::basic_string&lt;boost::detail::CharT, boost::detail::Traits, boost::detail::Alloc&gt;&gt;. "../../../../boost/lexical_cast.hpp", line 2078: Where: While instantiating "static boost::detail::lexical_cast_do_cast&lt;long, std::string&gt;::lexical_cast_impl(const std::string &amp;)". "../../../../boost/lexical_cast.hpp", line 2078: Where: Instantiated from non-template code. "../../../../boost/lexical_cast.hpp", line 1896: Error: Ambiguous partial specialization for boost::detail::is_stdstring&lt;std::string&gt;, boost::detail::is_stdstring&lt;boost::container::basic_string&lt;boost::detail::CharT, boost::detail::Traits, boost::detail::Alloc&gt;&gt; and boost::detail::is_stdstring&lt;std::basic_string&lt;boost::detail::CharT, boost::detail::Traits, boost::detail::Alloc&gt;&gt;. "../../../../boost/lexical_cast.hpp", line 2078: Where: While instantiating "static boost::detail::lexical_cast_do_cast&lt;long, std::string&gt;::lexical_cast_impl(const std::string &amp;)". "../../../../boost/lexical_cast.hpp", line 2078: Where: Instantiated from non-template code. 5 Error(s) and 11 Warning(s) detected. </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>Antony Polukhin</dc:creator> <pubDate>Wed, 01 Feb 2012 17:15:27 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/6462#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6462#comment:4</guid> <description> <p> STLPort successfully passes regression tests, so it is a specific compiler issue.<br /> I've disabled <code>boost::container::basic_string</code> optimizations for SunCC compiler in <a class="changeset" href="https://svn.boost.org/trac10/changeset/76824" title="Disabling some optimisations for sun cc Bug described in #6462">r76824</a> <br /> Please test and report, if the issue still exists. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Sat, 04 Feb 2012 18:33:34 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/6462#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6462#comment:5</guid> <description> <p> Confirmed fixed in Trunk. </p> <p> Thanks! John. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Antony Polukhin</dc:creator> <pubDate>Sun, 05 Feb 2012 07:46:17 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/6462#comment:6 https://svn.boost.org/trac10/ticket/6462#comment:6 <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> Merged to release in <a class="changeset" href="https://svn.boost.org/trac10/changeset/76887" title="Merge from trunk (fixed #6251, fixed #6453, disabled some ...">r76887</a> </p> Ticket