Skip to content

Commit b8bec15

Browse files
Merge pull request #1 from Purva-Chaudhari/bindBranch
Remove boost::bind dependency
2 parents a5d8d81 + 205ef8d commit b8bec15

File tree

17 files changed

+18
-28
lines changed

17 files changed

+18
-28
lines changed

CondCore/CondDB/plugins/RelationalAuthenticationService.cc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,16 @@
1616
#include <memory>
1717
#include <sys/stat.h>
1818

19-
#include <boost/bind/bind.hpp>
2019

2120
#include "CoralBase/MessageStream.h"
2221

2322
cond::RelationalAuthenticationService::RelationalAuthenticationService::RelationalAuthenticationService(
2423
const std::string& key)
2524
: coral::Service(key), m_authenticationPath(""), m_db(), m_cache(), m_callbackID(0) {
2625
boost::function1<void, std::string> cb(
27-
boost::bind(&cond::RelationalAuthenticationService::RelationalAuthenticationService::setAuthenticationPath,
26+
std::bind(&cond::RelationalAuthenticationService::RelationalAuthenticationService::setAuthenticationPath,
2827
this,
29-
boost::placeholders::_1));
28+
std::placeholders::_1));
3029

3130
coral::Property* pm = dynamic_cast<coral::Property*>(
3231
coral::Context::instance().PropertyManager().property(auth::COND_AUTH_PATH_PROPERTY));

CondCore/CondDB/plugins/XMLAuthenticationService.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
#include <memory>
2525
#include <sys/stat.h>
2626

27-
#include <boost/bind.hpp>
2827
#include "CoralBase/MessageStream.h"
2928

3029
constexpr char XML_AUTHENTICATION_FILE[] = "authentication.xml";
@@ -78,7 +77,7 @@ const coral::IAuthenticationCredentials& cond::XMLAuthenticationService::DataSou
7877
cond::XMLAuthenticationService::XMLAuthenticationService::XMLAuthenticationService(const std::string& key)
7978
: coral::Service(key), m_isInitialized(false), m_inputFileName(""), m_data(), m_mutexLock(), m_callbackID(0) {
8079
boost::function1<void, std::string> cb(
81-
boost::bind(&cond::XMLAuthenticationService::XMLAuthenticationService::setAuthenticationPath, this, _1));
80+
std::bind(&cond::XMLAuthenticationService::XMLAuthenticationService::setAuthenticationPath, this, std::placeholders::_1));
8281

8382
coral::Property* pm = dynamic_cast<coral::Property*>(
8483
coral::Context::instance().PropertyManager().property(auth::COND_AUTH_PATH_PROPERTY));

CondCore/Utilities/src/CondDBTools.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include "CondCore/CondDB/src/DbCore.h"
66
//
77
#include <boost/regex.hpp>
8-
#include <boost/bind.hpp>
8+
99
#include <memory>
1010

1111
namespace cond {

DataFormats/EcalDigi/test/EcalDigi_t.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ namespace {
173173
}
174174

175175
// std::for_each(frames.begin(),frames.end(),
176-
// boost::bind(verifyId,boost::bind(&edm::DataFrame::id,_1)));
176+
// std::bind(verifyId,std::bind(&edm::DataFrame::id, std::placeholders::_1)));
177177
// same as above....
178178
for (int n = 0; n < int(frames.size()); ++n) {
179179
edm::DataFrame df = frames[n];

Fireworks/Core/src/FWCompositeParameter.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ void FWCompositeParameter::addTo(FWConfiguration& oTo) const {
7878
(*it)->addTo(conf);
7979
}
8080
// std::for_each(begin(), end(),
81-
// boost::bind(&FWParameterBase::addTo,_1,conf));
81+
// std::bind(&FWParameterBase::addTo, std::placeholders::_1,conf));
8282

8383
oTo.addKeyValue(name(), conf, true);
8484
}

Fireworks/Core/src/FWISpyView.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
//
1212

1313
// system include files
14-
#include <boost/bind.hpp>
1514

1615
// user include files
1716
#include "TGLViewer.h"

Fireworks/Core/test/unittest_changemanager.cc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313
// system include files
1414
#include <boost/test/auto_unit_test.hpp>
15-
#include <boost/bind.hpp>
1615
#include <boost/test/test_tools.hpp>
1716

1817
#include "TClass.h"
@@ -96,8 +95,8 @@ BOOST_AUTO_TEST_CASE(changemanager) {
9695
//NOTE: have to pass a pointer to the listener else the bind will
9796
// create a copy of the listener and the original one will never
9897
// 'hear' any signal
99-
item.changed_.connect(boost::bind(&Listener::listen, &listener, _1));
100-
item.itemChanged_.connect(boost::bind(&ItemListener::listen, &iListener, _1));
98+
item.changed_.connect(std::bind(&Listener::listen, &listener, std::placeholders::_1));
99+
item.itemChanged_.connect(std::bind(&ItemListener::listen, &iListener, std::placeholders::_1));
101100

102101
BOOST_CHECK(listener.nHeard_ == 0);
103102
BOOST_CHECK(iListener.nHeard_ == 0);

Fireworks/Core/test/unittest_eventitemsmanager.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313
// system include files
1414
#include <boost/test/auto_unit_test.hpp>
15-
#include <boost/bind.hpp>
1615
#include <boost/test/test_tools.hpp>
1716
#include "TClass.h"
1817

@@ -62,7 +61,7 @@ BOOST_AUTO_TEST_CASE(eventitemmanager) {
6261
//NOTE: have to pass a pointer to the listener else the bind will
6362
// create a copy of the listener and the original one will never
6463
// 'hear' any signal
65-
eim.newItem_.connect(boost::bind(&Listener::newItem, &listener, _1));
64+
eim.newItem_.connect(std::bind(&Listener::newItem, &listener, std::placeholders::_1));
6665

6766
TClass* cls = TClass::GetClass("std::vector<reco::Track>");
6867
assert(0 != cls);

Fireworks/Core/test/unittest_parameters.cc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
// system include files
1414
#include <boost/test/auto_unit_test.hpp>
1515
#include <boost/test/test_tools.hpp>
16-
#include <boost/bind.hpp>
1716
#include <stdexcept>
1817
#include <iostream>
1918

@@ -26,8 +25,8 @@
2625
namespace {
2726
struct Test : public FWParameterizable {
2827
Test()
29-
: m_double(this, "double", boost::bind(&Test::doubleChanged, this, _1)),
30-
m_long(this, "long", boost::bind(&Test::longChanged, this, _1)),
28+
: m_double(this, "double", std::bind(&Test::doubleChanged, this, std::placeholders::_1)),
29+
m_long(this, "long", std::bind(&Test::longChanged, this, std::placeholders::_1)),
3130
m_wasChanged(false) {}
3231

3332
void doubleChanged(double iValue) {

Fireworks/Core/test/unittest_selectionmanager.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
// system include files
1414
//#include <boost/test/auto_unit_test.hpp>
15-
#include <boost/bind.hpp>
15+
1616
#define BOOST_TEST_DYN_LINK
1717
#define BOOST_TEST_MAIN
1818
#include <boost/test/unit_test.hpp>
@@ -81,7 +81,7 @@ BOOST_AUTO_TEST_CASE(selectionmanager) {
8181
//NOTE: have to pass a pointer to the listener else the bind will
8282
// create a copy of the listener and the original one will never
8383
// 'hear' any signal
84-
sm.selectionChanged_.connect(boost::bind(&Listener::listen, &listener, _1));
84+
sm.selectionChanged_.connect(std::bind(&Listener::listen, &listener, std::placeholders::_1));
8585

8686
reco::TrackCollection fVector;
8787
fVector.push_back(reco::Track());

GeneratorInterface/LHEInterface/plugins/LH5Source.cc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
#include <string>
55
#include <memory>
66

7-
#include <boost/bind.hpp>
87

98
#include "FWCore/Framework/interface/InputSourceMacros.h"
109
#include "FWCore/Framework/interface/MakerMacros.h"
@@ -148,13 +147,13 @@ void LH5Source::readEvent_(edm::EventPrincipal& eventPrincipal) {
148147
}
149148
std::for_each(partonLevel_->weights().begin(),
150149
partonLevel_->weights().end(),
151-
boost::bind(&LHEEventProduct::addWeight, product.get(), _1));
150+
std::bind(&LHEEventProduct::addWeight, product.get(), std::placeholders::_1));
152151
product->setScales(partonLevel_->scales());
153152
product->setNpLO(partonLevel_->npLO());
154153
product->setNpNLO(partonLevel_->npNLO());
155154
std::for_each(partonLevel_->getComments().begin(),
156155
partonLevel_->getComments().end(),
157-
boost::bind(&LHEEventProduct::addComment, product.get(), _1));
156+
std::bind(&LHEEventProduct::addComment, product.get(), std::placeholders::_1));
158157

159158
std::unique_ptr<edm::WrapperBase> edp(new edm::Wrapper<LHEEventProduct>(std::move(product)));
160159
eventPrincipal.put(lheProvenanceHelper_.eventProductBranchDescription_,

GeneratorInterface/MCatNLOInterface/plugins/MCatNLOSource.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
#include <sstream>
88
#include <string>
99

10-
#include <boost/bind.hpp>
1110

1211
#include "FWCore/Framework/interface/InputSourceMacros.h"
1312
#include "FWCore/Framework/interface/MakerMacros.h"

GeneratorInterface/Pythia6Interface/src/Pythia6Service.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#include <string>
88
#include <set>
99

10-
#include <boost/bind.hpp>
10+
1111
#include <boost/algorithm/string/classification.hpp>
1212
#include <boost/algorithm/string/split.hpp>
1313
#include <filesystem>

PerfTools/Callgrind/test/ProfilerServiceTest.cppunit.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#include "FWCore/ServiceRegistry/interface/ActivityRegistry.h"
55

66
#include <boost/ref.hpp>
7-
#include <boost/bind.hpp>
7+
88

99
#include <limits>
1010
#include <vector>

RecoLocalTracker/SiPixelRecHits/src/VVIObj.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
#include <cmath>
2222
#include <algorithm>
23-
#include <boost/bind.hpp>
23+
2424

2525
namespace VVIObjDetails {
2626
void sincosint(double x, double& sint, double& cint); //! Private version of the cosine and sine integral

SimMuon/CSCDigitizer/src/CSCStripElectronicsSim.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
#include "CLHEP/Units/GlobalPhysicalConstants.h"
1515
#include "CLHEP/Units/GlobalSystemOfUnits.h"
1616

17-
#include "boost/bind.hpp"
1817
#include <cassert>
1918
#include <list>
2019

Validation/MuonRPCGeometry/test/RPCHistos.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
#include "FWCore/Framework/interface/Frameworkfwd.h"
1212
#include "L1Trigger/RPCTrigger/interface/RPCConst.h"
1313
#include "FWCore/Utilities/interface/Exception.h"
14-
//#include "boost/bind.hpp"
1514

1615
const double ptRanges[RPCConst::m_PT_CODE_MAX+2]= {
1716
0.0, 0.01,

0 commit comments

Comments
 (0)