Back Midas Rome Roody Rootana
  Midas DAQ System  Not logged in ELOG logo
Entry  15 Apr 2014, Wes Gohn, Forum, C++11 error 
    Reply  16 Apr 2014, Stefan Ritt, Forum, C++11 error 
       Reply  16 Apr 2014, Wes Gohn, Forum, C++11 error 
          Reply  17 Apr 2014, Stefan Ritt, Forum, C++11 error 
Message ID: 993     Entry time: 17 Apr 2014     In reply to: 992
Author: Stefan Ritt 
Topic: Forum 
Subject: C++11 error 
> Thanks for the suggestion. It looks like it is instead the TRIGGER_ALL that is causing the problem. TRIGGER_ALL is defined as -1 in midas.h. If I replace TRIGGER_ALL with 0 in the 
> frontend, it compiles, but if I use -1, I get the same error. I do not think that I want my trigger mask set to 0. Do you have a suggestion of how to get around this?

Ok, then it's clear. The trigger mask inside the EQUIPMENT_INFO is defined as 16-bit unsigned int (WORD). So the -1 gets expanded into a 64-bit signed int, then the compiler complains about truncating this to 16-bit. 

Just try instead TRIGGER_ALL to write

(WORD)(-1)

or even

0xFFFF

that should do the job. Basically you want all 16 bits to be "1" if yo do not use this feature.

Best regards,
Stefan
ELOG V3.1.4-2e1708b5