[Rivet] compilation fix

Andy Buckley andy.buckley at cern.ch
Thu Sep 15 10:28:16 BST 2016


Hi Dmitry,

We didn't get the original email, so thanks for re-sending. However, 
this fix is itself not portable: the correct solution is to use 
std::tolower etc. which we've done.

Andy


On 15/09/16 06:12, Dmitry Kalinkin wrote:
> Hi again,
>
> Just wanted to check if my email got through. I don't see it on the
> list's archive at
> https://www.hepforge.org/lists-archive/rivet/2016-September/thread.html
>
> Cheers,
> Dmitry
>
> On Wed, Sep 7, 2016 at 12:28 AM, Dmitry Kalinkin
> <dmitry.kalinkin at gmail.com> wrote:
>> Dear Rivet developers,
>>
>> The patch below fixes compilation on clang. Hope you will find it useful.
>>
>> Thanks,
>>
>> Dmitry
>>
>> diff --git a/include/Rivet/Tools/Utils.hh b/include/Rivet/Tools/Utils.hh
>> --- a/include/Rivet/Tools/Utils.hh
>> +++ b/include/Rivet/Tools/Utils.hh
>> @@ -101,7 +101,7 @@ namespace Rivet {
>>    /// Convert a string to lower-case
>>    inline string toLower(const string& s) {
>>      string out = s;
>> -    std::transform(out.begin(), out.end(), out.begin(), (int(*)(int)) tolower);
>> +    std::transform(out.begin(), out.end(), out.begin(), (int(*)(int)) ::tolower);
>>      return out;
>>    }
>>
>> @@ -109,7 +109,7 @@ namespace Rivet {
>>    /// Convert a string to upper-case
>>    inline string toUpper(const string& s) {
>>      string out = s;
>> -    std::transform(out.begin(), out.end(), out.begin(), (int(*)(int)) toupper);
>> +    std::transform(out.begin(), out.end(), out.begin(), (int(*)(int)) ::toupper);
>>      return out;
>>    }
>>
>>
> _______________________________________________
> Rivet mailing list
> Rivet at projects.hepforge.org
> https://www.hepforge.org/lists/listinfo/rivet
>


-- 
Dr Andy Buckley, Lecturer / Royal Society University Research Fellow
Particle Physics Expt Group, University of Glasgow


More information about the Rivet mailing list