Trying to compile file libs/date_time/src/gregorian/greg_month.cpp I get an
error related to Boost.LexicalCast.
I have reduced the problem to a minimal test case:
#include <string>
#include
void f(const char* s)
{
std::string s1(boost::lexical_caststd::string(s));
}
My feeling is that this compiler has problems in the specializations for
boost::detail::is_stdstring and boost::detail::is_char_array_to_stdstring.
If I remove all those specializations the error goes away. I assume this is
not the perfect solution because I guess this will miss some optimization
of lexical_cast, but at least I can compile it this way :(
Is there a better solution for this?
Has this problem been fixed in 1.60?
Error message (full instantiation stack available if needed):
"/ThirdPartyLibs/boost/1_59_0/boost/lexical_cast/try_lexical_convert.hpp",
line 146: Error: Ambiguous partial specialization for
boost::detail::is_char_array_to_stdstring,
boost::detail::is_char_array_to_stdstring, const boost::detail::CharT*>
and
boost::detail::is_char_array_to_stdstring, const boost::detail::CharT*>.
"/ThirdPartyLibs/boost/1_59_0/boost/lexical_cast.hpp", line 42: Where:
While instantiating
"boost::conversion::detail::try_lexical_convert(const char*const&, std::string &)".
"/ThirdPartyLibs/boost/1_59_0/boost/lexical_cast/try_lexical_convert.hpp",
line 134: Error: Ambiguous partial specialization for
boost::detail::is_stdstringstd::string,
boost::detail::is_stdstring> and
boost::detail::is_stdstring>.
"/ThirdPartyLibs/boost/1_59_0/boost/lexical_cast.hpp", line 42: Where:
While instantiating
"boost::conversion::detail::try_lexical_convert(const char*const&, std::string &)".