|
[Rivet] Patch to compile on MavericksDavid Hall dhcrawley at gmail.comFri Nov 1 20:29:07 GMT 2013
Hello, I was trying to install Rivet 2.0 on OS X 10.9, and encountered a compilation error (Mac has only clang now, which is more fussy about C++ standards than gcc). It was complaining about trying to set a const string contained in a map. This was being done in the ProjectionHandler::_clone() method. You can see that it is trying to assign _namedprojs[newproj] = nps->second; Since the value of this map type is NameProjs, I looked at that class and saw that its keys are const. If I make the patch at the bottom of this email, things compile fine however. I guess you will need to look and decide if you agree with this change. Cheers, David diff --git a/include/Rivet/ProjectionHandler.hh b/include/Rivet/ProjectionHandler.hh index 2483a9a..7d42d60 100644 --- a/include/Rivet/ProjectionHandler.hh +++ b/include/Rivet/ProjectionHandler.hh @@ -49,7 +49,7 @@ namespace Rivet { /// @brief Typedef for the structure used to contain named projections for a /// particular containing Analysis or Projection. - typedef map<const string, ProjHandle> NamedProjs; + typedef map<string, ProjHandle> NamedProjs; /// Enum to specify depth of projection search. enum ProjDepth { SHALLOW, DEEP };
More information about the Rivet mailing list |