id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 12889,Invalid downcast warning in boost::lexical_cast when using UBSAN,arvo@…,Antony Polukhin,"The attempt to `lexical_cast` an `enum class` into a `std::string` produces a warning with UBSAN. GCC version: g++-6 (Ubuntu 6.2.0-3ubuntu11~16.04) 6.2.0 20160901 CXXFLAGS: -std=c++11 -fsanitize=undefined Warning text for the attached test program: {{{ (...)/boost/lexical_cast/detail/converter_lexical_streams.hpp:236:43: runtime error: downcast of address 0x7ffddfb77d38 which does not point to an object of type 'basic_unlockedbuf' 0x7ffddfb77d38: note: object is of type 'std::__cxx11::basic_stringbuf, std::allocator >' 69 7f 00 00 e8 ca fb c9 69 7f 00 00 21 dc d8 00 00 00 00 00 21 dc d8 00 00 00 00 00 21 dc d8 00 ^~~~~~~~~~~~~~~~~~~~~~~ vptr for 'std::__cxx11::basic_stringbuf, std::allocator >' }}}",Bugs,closed,Boost 1.63.0,lexical_cast,Boost 1.58.0,Problem,fixed,,