[App] Switch from boost::tuple to std::tuple
It's better to use the standard lib when possible
This commit is contained in:
@@ -3258,16 +3258,16 @@ static void initParser(const App::DocumentObject *owner)
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<boost::tuple<int, int, std::string> > tokenize(const std::string &str)
|
||||
std::vector<std::tuple<int, int, std::string> > tokenize(const std::string &str)
|
||||
{
|
||||
ExpressionParser::YY_BUFFER_STATE buf = ExpressionParser_scan_string(str.c_str());
|
||||
std::vector<boost::tuple<int, int, std::string> > result;
|
||||
std::vector<std::tuple<int, int, std::string> > result;
|
||||
int token;
|
||||
|
||||
column = 0;
|
||||
try {
|
||||
while ( (token = ExpressionParserlex()) != 0)
|
||||
result.push_back(boost::make_tuple(token, ExpressionParser::last_column, yytext));
|
||||
result.push_back(std::make_tuple(token, ExpressionParser::last_column, yytext));
|
||||
}
|
||||
catch (...) {
|
||||
// Ignore all exceptions
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#define EXPRESSION_H
|
||||
|
||||
#include <string>
|
||||
#include <boost/tuple/tuple.hpp>
|
||||
#include <tuple>
|
||||
#include <Base/Exception.h>
|
||||
#include <Base/Unit.h>
|
||||
#include <App/PropertyLinks.h>
|
||||
|
||||
@@ -451,7 +451,7 @@ AppExport UnitExpression * parseUnit(const App::DocumentObject *owner, const cha
|
||||
AppExport ObjectIdentifier parsePath(const App::DocumentObject *owner, const char* buffer);
|
||||
AppExport bool isTokenAnIndentifier(const std::string & str);
|
||||
AppExport bool isTokenAUnit(const std::string & str);
|
||||
AppExport std::vector<boost::tuple<int, int, std::string> > tokenize(const std::string & str);
|
||||
AppExport std::vector<std::tuple<int, int, std::string> > tokenize(const std::string & str);
|
||||
|
||||
/// Convenient class to mark begin of importing
|
||||
class AppExport ExpressionImporter {
|
||||
|
||||
@@ -78,13 +78,13 @@
|
||||
#include <unordered_map>
|
||||
#include <iterator>
|
||||
#include <functional>
|
||||
#include <tuple>
|
||||
|
||||
// Boost
|
||||
#include <boost_signals2.hpp>
|
||||
#include <boost/bind/bind.hpp>
|
||||
#include <boost/regex.hpp>
|
||||
|
||||
#include <boost/tuple/tuple.hpp>
|
||||
#include <boost/utility.hpp>
|
||||
#include <boost_graph_adjacency_list.hpp>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user