id summary reporter owner description type status milestone component version severity resolution keywords cc 9335 default constructed split_iterator has UB when copy constructed nlewycky@… Marshall Clow "The copy constructor for split_iterator is: {{{ split_iterator( const split_iterator& Other ) : base_type(Other), m_Match(Other.m_Match), m_Next(Other.m_Next), m_End(Other.m_End), m_bEof(Other.m_bEof) {} }}} Note that the member copies in the constructor initializer list perform lvalue-to-rvalue conversion. That has undefined behaviour when the value is uninitialized. The default constructor is implemented as so: {{{ split_iterator() {} }}} This means that if you default-construct a split_iterator then try to copy it, the copy ctor will exhibit undefined behaviour. I think this was intended to be valid, all default-constructed split_iterators compare equal. The two possible fixes are to either change the default constructor to initialize the four members, or to change the copy constructor to use memcpy to copy the value representation instead of the object representation (I haven't checked whether all the members are trivially copyable)." Bugs closed To Be Determined string_algo Boost Development Trunk Problem fixed split_iterator gromer@…