Commit b509659e authored by Enrico Bothmann's avatar Enrico Bothmann

Merge -c28696 ^/trunk/SHERPA .

Original commit message:

Add namespace specifications for instantiations

Add namespace to explicit class template instantiations, as otherwise clang
sees the omission as an error, if using

    CXXFLAGS="-std=c++11 -stdlib=libc++".

This enables compilation with clang linking to Rivet 2.5.0, which requires C++11.

For the same reason, an implicit cast has been made explicit and some weird
rvalue construction has been replaced with code that is readable and compiles.
parent 30998f24
......@@ -348,7 +348,7 @@ void Cluster_Algorithm::ClusterSpecial4lLoop2()
Vec4D_Vector clustered_moms=p_clus->Combine
(*ampl, winner, emitted_idx, 1-winner, Flavour(kf_gluon),p_ms);
int color[2] = { Flow::Counter(), Flow::Counter() };
unsigned int color[2] = { Flow::Counter(), Flow::Counter() };
for (int i=0;i<2; ++i) {
size_t id=(1<<i);
if (i==winner) id+=(1<<emitted_idx);
......
......@@ -121,4 +121,4 @@ const Variable_Base<ValueType> *Axis<ValueType>::Variable() const
return p_variable;
}
template class Axis<double>;
template class ATOOLS::Axis<double>;
......@@ -411,8 +411,8 @@ Vec4C CMatrix::operator* (const Vec4C& cvec) {
//=============================
template class Matrix<2>;
template class Matrix<3>;
template class Matrix<4>;
template class Matrix<5>;
template class Matrix<6>;
template class ATOOLS::Matrix<2>;
template class ATOOLS::Matrix<3>;
template class ATOOLS::Matrix<4>;
template class ATOOLS::Matrix<5>;
template class ATOOLS::Matrix<6>;
......@@ -166,7 +166,7 @@ X_To_P_Scaling<Value_Type>::X_To_P_Scaling(const std::string &parameter)
this->m_name="X_To_P_"+ToString(m_p);
}
template class Scaling_Base<double>;
template class ATOOLS::Scaling_Base<double>;
#define COMPILE__Getter_Function
#define OBJECT_TYPE Scaling_Base<double>
......
......@@ -485,7 +485,7 @@ Theta2<ValueType>::Theta2(): Variable_Base<ValueType>("Theta2")
this->m_selectorid="Angle";
}
template class Variable_Base<double>;
template class ATOOLS::Variable_Base<double>;
#define COMPILE__Getter_Function
#define OBJECT_TYPE Variable_Base<double>
......
......@@ -161,6 +161,6 @@ GetGetters(const std::string &name)
return list;
}
template class Getter_Function<OBJECT_TYPE,PARAMETER_TYPE,SORT_CRITERION>;
template class ATOOLS::Getter_Function<OBJECT_TYPE,PARAMETER_TYPE,SORT_CRITERION>;
#endif
......@@ -608,14 +608,14 @@ template void Blob_Data_Base::Set<std::vector<double> >(const std::vector<double
template void Blob_Data_Base::Set<std::vector<int> >(const std::vector<int> &data);
template void Blob_Data_Base::Set<Vec4D>(const Vec4D &data);
template class Blob_Data<int>;
template class Blob_Data<size_t>;
template class Blob_Data<long>;
template class Blob_Data<double>;
template class Blob_Data<std::string>;
template class Blob_Data<std::vector<double> >;
template class Blob_Data<std::vector<int> >;
template class Blob_Data<Vec4D>;
template class ATOOLS::Blob_Data<int>;
template class ATOOLS::Blob_Data<size_t>;
template class ATOOLS::Blob_Data<long>;
template class ATOOLS::Blob_Data<double>;
template class ATOOLS::Blob_Data<std::string>;
template class ATOOLS::Blob_Data<std::vector<double> >;
template class ATOOLS::Blob_Data<std::vector<int> >;
template class ATOOLS::Blob_Data<Vec4D>;
void Blob::SwapInParticles(const size_t i, const size_t j)
{
......
......@@ -6,10 +6,10 @@
#define SORT_CRITERION std::less<std::string>
#include "ATOOLS/Org/Getter_Function.C"
template class Getter_Function
template class ATOOLS::Getter_Function
<CSSHOWER::SF_Coupling,CSSHOWER::SF_Key,SORT_CRITERION>;
template class Getter_Function
template class ATOOLS::Getter_Function
<void,CSSHOWER::SFC_Filler_Key,SORT_CRITERION>;
#include "CSSHOWER++/Tools/Parton.H"
......
......@@ -6,10 +6,10 @@
#define SORT_CRITERION std::less<std::string>
#include "ATOOLS/Org/Getter_Function.C"
template class Getter_Function
template class ATOOLS::Getter_Function
<MCATNLO::SF_Coupling,MCATNLO::SF_Key,SORT_CRITERION>;
template class Getter_Function
template class ATOOLS::Getter_Function
<void,MCATNLO::SFC_Filler_Key,SORT_CRITERION>;
#include "MCATNLO/Tools/Parton.H"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment