Github user Typz commented on a diff in the pull request:
https://github.com/apache/thrift/pull/1448#discussion_r159267705
--- Diff: lib/cpp/src/thrift/processor/TMultiplexedProcessor.h ---
@@ -165,10 +166,11 @@ class TMultiplexedProcessor : public TProcessor {
}
// Extract the service name
- boost::tokenizer<boost::char_separator<char> > tok(name,
boost::char_separator<char>(":"));
-
std::vector<std::string> tokens;
- std::copy(tok.begin(), tok.end(), std::back_inserter(tokens));
+ std::istringstream tokenStream(name);
+ for (std::string token; std::getline(tokenStream, token, ':');) {
--- End diff --
std::getline is available also in pre-C++11 (though C++11 adds some
overloads): http://en.cppreference.com/w/cpp/string/basic_string/getline
I would be OK with C++11, but this may not be applicable to all cases...
Maybe a safer approach would be first allow use without boost (relying on
C++11: i.e. this patch :-) ), then add C++11 requirement if this is acceptable.
---