Warning, /acts/cmake/pythia8307-cpp20.patch is written in an unsupported language. File is not indexed.
0001 From 09ef584f1ca797d84c1c0af18ec06b33d6c0d2d0 Mon Sep 17 00:00:00 2001
0002 From: Paul Gessinger <paul.gessinger@cern.ch>
0003 Date: Thu, 24 Mar 2022 16:08:26 +0100
0004 Subject: [PATCH] fixes for C++20 build
0005
0006 ---
0007 include/Pythia8/SusyLesHouches.h | 6 +++---
0008 src/HadronWidths.cc | 8 ++++----
0009 src/NucleonExcitations.cc | 8 ++++----
0010 src/PythiaParallel.cc | 2 +-
0011 4 files changed, 12 insertions(+), 12 deletions(-)
0012
0013 diff --git a/include/Pythia8/SusyLesHouches.h b/include/Pythia8/SusyLesHouches.h
0014 index 2f1d9fd..5090c00 100644
0015 --- a/include/Pythia8/SusyLesHouches.h
0016 +++ b/include/Pythia8/SusyLesHouches.h
0017 @@ -28,7 +28,7 @@ namespace Pythia8 {
0018 public:
0019
0020 //Constructor.
0021 - LHblock<T>() : idnow(0), qDRbar(), i(), val() {} ;
0022 + LHblock() : idnow(0), qDRbar(), i(), val() {} ;
0023
0024 //Does block exist?
0025 bool exists() { return int(entry.size()) == 0 ? false : true ; };
0026 @@ -129,7 +129,7 @@ namespace Pythia8 {
0027 template <int size> class LHmatrixBlock {
0028 public:
0029 //Constructor. Set uninitialized and explicitly zero.
0030 - LHmatrixBlock<size>() : entry(), qDRbar(), val() {
0031 + LHmatrixBlock() : entry(), qDRbar(), val() {
0032 initialized=false;
0033 for (i=1;i<=size;i++) {
0034 for (j=1;j<=size;j++) {
0035 @@ -208,7 +208,7 @@ namespace Pythia8 {
0036 template <int size> class LHtensor3Block {
0037 public:
0038 //Constructor. Set uninitialized and explicitly zero.
0039 - LHtensor3Block<size>() : entry(), qDRbar(), val() {
0040 + LHtensor3Block() : entry(), qDRbar(), val() {
0041 initialized=false;
0042 for (i=1;i<=size;i++) {
0043 for (j=1;j<=size;j++) {
0044 diff --git a/src/HadronWidths.cc b/src/HadronWidths.cc
0045 index ccc5c72..95a5cb1 100644
0046 --- a/src/HadronWidths.cc
0047 +++ b/src/HadronWidths.cc
0048 @@ -867,7 +867,7 @@ double HadronWidths::psSize(double eCM, ParticleDataEntryPtr prodA,
0049 return 0.;
0050
0051 // Integrate mass of A.
0052 - auto f = [=](double mA) {
0053 + auto f = [=,this](double mA) {
0054 return pow(pCMS(eCM, mA, m0B), lType) * mDistr(idA, mA); };
0055 if (!integrateGauss(result, f, mMinA, min(mMaxA, eCM - m0B)))
0056 success = false;
0057 @@ -879,7 +879,7 @@ double HadronWidths::psSize(double eCM, ParticleDataEntryPtr prodA,
0058 return 0.;
0059
0060 // Integrate mass of B.
0061 - auto f = [=](double mB) {
0062 + auto f = [=,this](double mB) {
0063 return pow(pCMS(eCM, m0A, mB), lType) * mDistr(idB, mB); };
0064 if (!integrateGauss(result, f, mMinB, min(mMaxB, eCM - m0A)))
0065 success = false;
0066 @@ -891,10 +891,10 @@ double HadronWidths::psSize(double eCM, ParticleDataEntryPtr prodA,
0067 return 0.;
0068
0069 // Define integrand of outer integral.
0070 - auto I = [=, &success](double mA) {
0071 + auto I = [=, &success, this](double mA) {
0072
0073 // Define integrand of inner integral.
0074 - auto f = [=](double mB) {
0075 + auto f = [=,this](double mB) {
0076 return pow(pCMS(eCM, mA, mB), lType)
0077 * mDistr(idA, mA) * mDistr(idB, mB); };
0078 double res;
0079 diff --git a/src/NucleonExcitations.cc b/src/NucleonExcitations.cc
0080 index b5eef8f..a82383a 100644
0081 --- a/src/NucleonExcitations.cc
0082 +++ b/src/NucleonExcitations.cc
0083 @@ -502,7 +502,7 @@ double NucleonExcitations::psSize(double eCM, ParticleDataEntry& prodA,
0084 return 0.;
0085
0086 // Integrate mass of A.
0087 - auto f = [=](double mA) {
0088 + auto f = [=, this](double mA) {
0089 return pCMS(eCM, mA, m0B) * hadronWidthsPtr->mDistr(idA, mA); };
0090 if (!integrateGauss(result, f, mMinA, min(mMaxA, eCM - m0B)))
0091 success = false;
0092 @@ -514,7 +514,7 @@ double NucleonExcitations::psSize(double eCM, ParticleDataEntry& prodA,
0093 return 0.;
0094
0095 // Integrate mass of B.
0096 - auto f = [=](double mB) {
0097 + auto f = [=,this](double mB) {
0098 return pCMS(eCM, m0A, mB) * hadronWidthsPtr->mDistr(idB, mB); };
0099 if (!integrateGauss(result, f, mMinB, min(mMaxB, eCM - m0A)))
0100 success = false;
0101 @@ -526,10 +526,10 @@ double NucleonExcitations::psSize(double eCM, ParticleDataEntry& prodA,
0102 return 0.;
0103
0104 // Define integrand of outer integral.
0105 - auto I = [=, &success](double mA) {
0106 + auto I = [=, &success, this](double mA) {
0107
0108 // Define integrand of inner integral.
0109 - auto f = [=](double mB) {
0110 + auto f = [=,this](double mB) {
0111 return pCMS(eCM, mA, mB)
0112 * hadronWidthsPtr->mDistr(idA, mA)
0113 * hadronWidthsPtr->mDistr(idB, mB); };
0114 diff --git a/src/PythiaParallel.cc b/src/PythiaParallel.cc
0115 index 81450e2..7ec3a92 100644
0116 --- a/src/PythiaParallel.cc
0117 +++ b/src/PythiaParallel.cc
0118 @@ -106,7 +106,7 @@ bool PythiaParallel::init(function<bool(Pythia&)> customInit) {
0119 bool initSuccess = true;
0120
0121 for (int iPythia = 0; iPythia < numThreads; iPythia += 1) {
0122 - initThreads.emplace_back([=, &seeds, &initSuccess]() {
0123 + initThreads.emplace_back([=, &seeds, &initSuccess, this]() {
0124 Pythia* pythiaPtr = new Pythia(settings, particleData, false);
0125 pythiaObjects[iPythia] = unique_ptr<Pythia>(pythiaPtr);
0126 pythiaObjects[iPythia]->settings.flag("Print:quiet", true);
0127 --
0128 2.31.1
0129