Opened 11 years ago

#6024 new Bugs

Behaviour and documentation don't match

Reported by: Olaf van der Spek <olafvdspek@…> Owned by: jsiek
Milestone: To Be Determined Component: tokenizer
Version: Boost 1.47.0 Severity: Problem
Keywords: Cc:

Description

Hi,

explicit char_separator()

Explicit? Doesn't explicit only apply to one argument constructors?

The function std::isspace() is used to identify dropped delimiters and std::ispunct() is used to identify kept delimiters. In addition, empty tokens are dropped.

std::string s("[1][3][5][]9"); BOOST_FOREACH(auto i, boost::tokenizer<>(s))

std::cout << i << std::endl;

This outputs only numbers. Shouldn't the brackets be included too?

Change History (0)

Note: See TracTickets for help on using tickets.