Opened 11 years ago

Closed 11 years ago

#6462 closed Bugs (fixed)

lexical_cast fails on Linux with Sun CC

Reported by: John Maddock Owned by: Antony Polukhin
Milestone: To Be Determined Component: lexical_cast
Version: Boost Development Trunk Severity: Problem
Keywords: Cc:

Description

Lexical cast fails to build with sun's compiler on Linux:

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&).
"../../../../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&).
"../../../../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&).
"../../../../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&).
"../../../../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&).
"../../../../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&).
"../../../../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&).
"../../../../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&).
"../../../../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&).
"../../../../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&).
"../../../../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&).
"../../../../boost/lexical_cast.hpp", line 1845: Error: Ambiguous partial specialization for boost::detail::stream_char<std::string>, boost::detail::stream_char<boost::container::basic_string<boost::detail::CharT, boost::detail::Traits, boost::detail::Alloc>> and boost::detail::stream_char<std::basic_string<boost::detail::CharT, boost::detail::Traits, boost::detail::Alloc>>.
"../../../../boost/lexical_cast.hpp", line 2060:     Where: While instantiating "static boost::detail::lexical_cast_do_cast<long, std::string>::lexical_cast_impl(const std::string &)".
"../../../../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<std::string>, boost::detail::stream_char<boost::container::basic_string<boost::detail::CharT, boost::detail::Traits, boost::detail::Alloc>> and boost::detail::stream_char<std::basic_string<boost::detail::CharT, boost::detail::Traits, boost::detail::Alloc>>.
"../../../../boost/lexical_cast.hpp", line 2060:     Where: While instantiating "static boost::detail::lexical_cast_do_cast<long, std::string>::lexical_cast_impl(const std::string &)".
"../../../../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<char, long, std::string>, boost::detail::deduce_char_traits<boost::detail::CharT, boost::detail::Target, boost::container::basic_string<boost::detail::CharT, boost::detail::Traits, boost::detail::Alloc>> and boost::detail::deduce_char_traits<boost::detail::CharT, boost::detail::Target, std::basic_string<boost::detail::CharT, boost::detail::Traits, boost::detail::Alloc>>.
"../../../../boost/lexical_cast.hpp", line 2060:     Where: While instantiating "static boost::detail::lexical_cast_do_cast<long, std::string>::lexical_cast_impl(const std::string &)".
"../../../../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<char, long, std::string>, boost::detail::deduce_char_traits<boost::detail::CharT, boost::detail::Target, boost::container::basic_string<boost::detail::CharT, boost::detail::Traits, boost::detail::Alloc>> and boost::detail::deduce_char_traits<boost::detail::CharT, boost::detail::Target, std::basic_string<boost::detail::CharT, boost::detail::Traits, boost::detail::Alloc>>.
"../../../../boost/lexical_cast.hpp", line 2060:     Where: While instantiating "static boost::detail::lexical_cast_do_cast<long, std::string>::lexical_cast_impl(const std::string &)".
"../../../../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<std::string>, boost::detail::is_stdstring<boost::container::basic_string<boost::detail::CharT, boost::detail::Traits, boost::detail::Alloc>> and boost::detail::is_stdstring<std::basic_string<boost::detail::CharT, boost::detail::Traits, boost::detail::Alloc>>.
"../../../../boost/lexical_cast.hpp", line 2060:     Where: While instantiating "static boost::detail::lexical_cast_do_cast<long, std::string>::lexical_cast_impl(const std::string &)".
"../../../../boost/lexical_cast.hpp", line 2060:     Where: Instantiated from non-template code.
5 Error(s) and 11 Warning(s) detected.


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!).

Not sure if this is a general STLPort issue (don't see why it should be), or a specific compiler issue.

Change History (6)

comment:1 by John Maddock, 11 years ago

Owner: changed from nasonov to Antony Polukhin

comment:2 by Antony Polukhin, 11 years ago

Looks like a duplicate for #6453
Try again the trunk version. error must be already fixed.

comment:3 by anonymous, 11 years ago

Hope with current Trunk I stll see:

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&).
"../../../../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&).
"../../../../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&).
"../../../../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&).
"../../../../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&).
"../../../../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&).
"../../../../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&).
"../../../../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&).
"../../../../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&).
"../../../../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&).
"../../../../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&).
"../../../../boost/lexical_cast.hpp", line 1863: Error: Ambiguous partial specialization for boost::detail::stream_char<std::string>, boost::detail::stream_char<boost::container::basic_string<boost::detail::CharT, boost::detail::Traits, boost::detail::Alloc>> and boost::detail::stream_char<std::basic_string<boost::detail::CharT, boost::detail::Traits, boost::detail::Alloc>>.
"../../../../boost/lexical_cast.hpp", line 2078:     Where: While instantiating "static boost::detail::lexical_cast_do_cast<long, std::string>::lexical_cast_impl(const std::string &)".
"../../../../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<std::string>, boost::detail::stream_char<boost::container::basic_string<boost::detail::CharT, boost::detail::Traits, boost::detail::Alloc>> and boost::detail::stream_char<std::basic_string<boost::detail::CharT, boost::detail::Traits, boost::detail::Alloc>>.
"../../../../boost/lexical_cast.hpp", line 2078:     Where: While instantiating "static boost::detail::lexical_cast_do_cast<long, std::string>::lexical_cast_impl(const std::string &)".
"../../../../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<char, long, std::string>, boost::detail::deduce_char_traits<boost::detail::CharT, boost::detail::Target, boost::container::basic_string<boost::detail::CharT, boost::detail::Traits, boost::detail::Alloc>> and boost::detail::deduce_char_traits<boost::detail::CharT, boost::detail::Target, std::basic_string<boost::detail::CharT, boost::detail::Traits, boost::detail::Alloc>>.
"../../../../boost/lexical_cast.hpp", line 2078:     Where: While instantiating "static boost::detail::lexical_cast_do_cast<long, std::string>::lexical_cast_impl(const std::string &)".
"../../../../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<char, long, std::string>, boost::detail::deduce_char_traits<boost::detail::CharT, boost::detail::Target, boost::container::basic_string<boost::detail::CharT, boost::detail::Traits, boost::detail::Alloc>> and boost::detail::deduce_char_traits<boost::detail::CharT, boost::detail::Target, std::basic_string<boost::detail::CharT, boost::detail::Traits, boost::detail::Alloc>>.
"../../../../boost/lexical_cast.hpp", line 2078:     Where: While instantiating "static boost::detail::lexical_cast_do_cast<long, std::string>::lexical_cast_impl(const std::string &)".
"../../../../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<std::string>, boost::detail::is_stdstring<boost::container::basic_string<boost::detail::CharT, boost::detail::Traits, boost::detail::Alloc>> and boost::detail::is_stdstring<std::basic_string<boost::detail::CharT, boost::detail::Traits, boost::detail::Alloc>>.
"../../../../boost/lexical_cast.hpp", line 2078:     Where: While instantiating "static boost::detail::lexical_cast_do_cast<long, std::string>::lexical_cast_impl(const std::string &)".
"../../../../boost/lexical_cast.hpp", line 2078:     Where: Instantiated from non-template code.
5 Error(s) and 11 Warning(s) detected.

comment:4 by Antony Polukhin, 11 years ago

STLPort successfully passes regression tests, so it is a specific compiler issue.
I've disabled boost::container::basic_string optimizations for SunCC compiler in r76824
Please test and report, if the issue still exists.

comment:5 by anonymous, 11 years ago

Confirmed fixed in Trunk.

Thanks! John.

comment:6 by Antony Polukhin, 11 years ago

Resolution: fixed
Status: newclosed

Merged to release in r76887

Last edited 11 years ago by Antony Polukhin (previous) (diff)
Note: See TracTickets for help on using tickets.