THRIFT-507. Stop using boost::lexical_cast in the compiler
We were using boost::lexical_cast to convert an integer to a string,
but using a stringstream is only slightly more complicated.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@991252 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/compiler/cpp/src/parse/t_field.h b/compiler/cpp/src/parse/t_field.h
index 4217a51..fb58ca7 100644
--- a/compiler/cpp/src/parse/t_field.h
+++ b/compiler/cpp/src/parse/t_field.h
@@ -21,7 +21,7 @@
#define T_FIELD_H
#include <string>
-#include <boost/lexical_cast.hpp>
+#include <sstream>
#include "t_doc.h"
@@ -117,7 +117,9 @@
// This is not the same function as t_type::get_fingerprint_material,
// but it does the same thing.
std::string get_fingerprint_material() const {
- return boost::lexical_cast<std::string>(key_) + ":" +
+ std::ostringstream keystm;
+ keystm << key_;
+ return keystm.str() + ":" +
((req_ == T_OPTIONAL) ? "opt-" : "") +
type_->get_fingerprint_material();
}