diff --git a/FWCore/Modules/src/EventContentAnalyzer.cc b/FWCore/Modules/src/EventContentAnalyzer.cc index 447bc64694335..ca813d12bd36d 100644 --- a/FWCore/Modules/src/EventContentAnalyzer.cc +++ b/FWCore/Modules/src/EventContentAnalyzer.cc @@ -436,11 +436,6 @@ namespace edm { for (nameMap::const_iterator it = cumulates_.begin(), itEnd = cumulates_.end(); it != itEnd; ++it) { LogAbsolute("EventContent") << std::setw(6) << it->second << " occurrences of key " << it->first << std::endl; } - - // Test boost::lexical_cast We don't need this right now so comment it out. - // int k = 137; - // std::string ktext = boost::lexical_cast(k); - // std::cout << "\nInteger " << k << " expressed as a string is |" << ktext << "|" << std::endl; } void EventContentAnalyzer::fillDescriptions(ConfigurationDescriptions& descriptions) { diff --git a/FWCore/ParameterSet/src/types.cc b/FWCore/ParameterSet/src/types.cc index d5b81cf890cec..abcfd9316a167 100644 --- a/FWCore/ParameterSet/src/types.cc +++ b/FWCore/ParameterSet/src/types.cc @@ -8,7 +8,6 @@ #include "FWCore/ParameterSet/interface/types.h" -#include "boost/lexical_cast.hpp" #include "FWCore/ParameterSet/src/split.h" #include "FWCore/Utilities/interface/Parse.h" #include @@ -459,9 +458,9 @@ bool edm::decode(double& to, std::string const& from) { else { try { // std::cerr << "from:" << from << std::endl; - to = boost::lexical_cast(from); + to = std::stod(from); // std::cerr << "to:" << to << std::endl; - } catch (boost::bad_lexical_cast&) { + } catch (const std::exception&) { return false; } } diff --git a/FWCore/Services/plugins/ProcInfoFetcher.cc b/FWCore/Services/plugins/ProcInfoFetcher.cc index aac69f4e7d359..83d270b2aba85 100644 --- a/FWCore/Services/plugins/ProcInfoFetcher.cc +++ b/FWCore/Services/plugins/ProcInfoFetcher.cc @@ -23,7 +23,6 @@ #include //#include #include -#include #include #include @@ -96,27 +95,27 @@ namespace { int getInt() { const char* t = getItem(); //std::cout <<"int '"<(t); + return std::stoi(t); } long getLong() { const char* t = getItem(); //std::cout <<"long '"<(t); + return std::stol(t); } unsigned int getUInt() { const char* t = getItem(); //std::cout <<"uint '"<(t); + return std::stoul(t); } unsigned long getULong() { const char* t = getItem(); //std::cout <<"ulong '"<(t); + return std::stoul(t); } unsigned long long getULongLong() { const char* t = getItem(); //std::cout <<"ulong '"<(t); + return std::stoull(t); } char getChar() { return *getItem(); } std::string getString() { return std::string(getItem()); } @@ -210,7 +209,7 @@ namespace edm { pinfo.num_threads >> pinfo.itrealvalue >> pinfo.starttime >> pinfo.vsize >> pinfo.rss >> pinfo.rlim >> pinfo.startcode >> pinfo.endcode >> pinfo.startstack >> pinfo.kstkesp >> pinfo.kstkeip >> pinfo.signal >> pinfo.blocked >> pinfo.sigignore >> pinfo.sigcatch >> pinfo.wchan; - } catch (boost::bad_lexical_cast& iE) { + } catch (const std::exception& iE) { LogWarning("ProcInfoFetcher") << "Parsing of Prof file failed:" << iE.what() << std::endl; return ProcInfo(); } diff --git a/FWCore/Services/plugins/SimpleMemoryCheck.cc b/FWCore/Services/plugins/SimpleMemoryCheck.cc index da81b98c76b39..8ed7fcd4de984 100644 --- a/FWCore/Services/plugins/SimpleMemoryCheck.cc +++ b/FWCore/Services/plugins/SimpleMemoryCheck.cc @@ -52,7 +52,6 @@ //#include #include //#include -#include #include #include diff --git a/FWCore/Utilities/src/ReleaseVersion.cc b/FWCore/Utilities/src/ReleaseVersion.cc index eefd8da07d4a4..4fd4c4bcbe9ff 100644 --- a/FWCore/Utilities/src/ReleaseVersion.cc +++ b/FWCore/Utilities/src/ReleaseVersion.cc @@ -1,7 +1,6 @@ #include "FWCore/Utilities/interface/ReleaseVersion.h" #include "boost/algorithm/string.hpp" -#include "boost/lexical_cast.hpp" #include #include @@ -33,17 +32,17 @@ namespace edm { /* if(parts.size() == 4) { if(releaseVersion.find("patch") != std::string::npos) { - patch_ = boost::lexical_cast(parts[3]); + patch_ = std::stoul(parts[3]); } else if(releaseVersion.find("pre") != std::string::npos) { - pre_ = boost::lexical_cast(parts[3]); + pre_ = std::stoul(parts[3]); } else { return; } } */ - major_ = boost::lexical_cast(parts[0]); - minor_ = boost::lexical_cast(parts[1]); - // point_ = boost::lexical_cast(parts[2]); + major_ = std::stoul(parts[0]); + minor_ = std::stoul(parts[1]); + // point_ = std::stoul(parts[2]); irregular_ = false; } catch (std::exception const&) { }