RSSAmplifier

John Z. Li’s Programming Corner · Jul 2, 2024

Boost::split is broken

0
Sign in to vote or save

This page cannot be shown here. You can still read it on the original site — the toolbar below keeps your place in the directory.

Several days ago, I was bitten by this weird behavior of boost::split: if the input string is empty, it puts an empty string into the output vector. With the following code, the result vector is not empty but contains an empty string. std::vector<std::string> result; boost::split(result, "", boost::is_any_of(","), boost::algorithm::token_compress_on); assert(result.size() == 1u); This is really…

Read on /c++/2024/07/02/Boost-split-is-broken.html

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.