#include <string>
#include <vector>
#include <boost/algorithm/string.hpp>
int main() {
std::vector<std::string> result;
boost::split(result, "", boost::is_any_of(","), boost::algorithm::token_compress_on);
std::cout << result.size(); // 1
}
输出: 1
期望输出: 0
c++ - boost::split pushes an empty string to the vector even with token_compress_on - Stack Overflow