Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
-
Patch Available
Description
When trying to compile with custom map, i.e. unordered_map for c++, the method `printTo` fails when trying to use `::apache::thrift::to_string` on an object of unordered_map. This is because the template specialization for `to_string` does not include the type for `unordered_map` or `unordered_set`
:basic_string<char>, utils::Stat>, std::__cxx11::basic_string<char> >' /usr/include/boost/lexical_cast/detail/converter_lexical.hpp:465:15: required from 'struct boost::detail::lexical_converter_impl<std::__cxx11::basic_string<char>, std::unordered_map<std::__cxx11::basic_string<char>, utils::Stat> >' /usr/include/boost/lexical_cast/try_lexical_convert.hpp:173:44: required from 'bool boost::conversion::detail::try_lexical_convert(const Source&, Target&) [with Target = std::__cxx11::basic_string<char>; Source = std::unordered_map<std::__cxx11::basic_string<char>, utils::Stat>]' /usr/include/boost/lexical_cast.hpp:41:60: required from 'Target boost::lexical_cast(const Source&) [with Target = std::__cxx11::basic_string<char>; Source = std::unordered_map<std::__cxx11::basic_string<char>, utils::Stat>]' /usr/include/thrift/TToString.h:37:42: required from 'std::__cxx11::string apache::thrift::to_string(const T&) [with T = std::unordered_map<std::__cxx11::basic_string<char>, utils::Stat>; std::__cxx11::string = std::__cxx11::basic_string<char>]' filesystem_types.cpp:1111:56: required from here /usr/include/boost/lexical_cast/detail/converter_lexical.hpp:209:13: error: static assertion failed: Source type is neither std::ostream`able nor std::wostream`able BOOST_STATIC_ASSERT_MSG((result_t::value || boost::has_left_shift< std::basic_ostream< type >, T >::value),
Attachments
Issue Links
- links to