--- pythia8306.orig/include/Pythia8/PythiaStdlib.h 2021-06-29 16:10:32.000000000 +0200
+++ pythia8306/include/Pythia8/PythiaStdlib.h 2022-01-15 20:36:32.816348346 +0100
@@ -28,6 +28,7 @@
#include <set>
#include <list>
#include <functional>
+#include <type_traits>
// Stdlib header file for dynamic library loading.
#include <dlfcn.h>
--- pythia8306.orig/include/Pythia8/SusyLesHouches.h 2021-06-29 16:10:32.000000000 +0200
+++ pythia8306/include/Pythia8/SusyLesHouches.h 2022-01-15 22:28:37.409356450 +0100
@@ -65,13 +65,28 @@
? true : false;};
// Indexing with (). Output only.
- T operator()() {
+ template<class Q = T>
+ typename std::enable_if<std::is_arithmetic<Q>::value, Q>::type
+ operator()() {
if (exists(0)) {return entry[0];} else {T dummy(0); return dummy;};
};
- T operator()(int iIn) {
+ template<class Q = T>
+ typename std::enable_if<std::is_arithmetic<Q>::value, Q>::type
+ operator()(int iIn) {
if (exists(iIn)) {return entry[iIn];} else {T dummy(0); return dummy;};
};
+ template<class Q = T>
+ typename std::enable_if<!std::is_arithmetic<Q>::value, Q>::type
+ operator()() {
+ if (exists(0)) {return entry[0];} else {T dummy; return dummy;};
+ };
+ template<class Q = T>
+ typename std::enable_if<!std::is_arithmetic<Q>::value, Q>::type
+ operator()(int iIn) {
+ if (exists(iIn)) {return entry[iIn];} else {T dummy; return dummy;};
+ };
+
// Size of map
int size() {return int(entry.size());};