What is “required from here”

This is in my view "Problems with Eclipse." The code compiles fine, but there is an error saying " required from here ", pointing to some boost header file and to the line state_data const current_state=interlocked_compare_exchange(&state,new_state,old_state);

I don't like errors or warnings. Does anyone know what it is?

+6
source share
2 answers

This behavior is an eclipse CDT Error Parser error: https://bugs.eclipse.org/bugs/show_bug.cgi?id=108720 This error is actually a warning, and is responsible for this. You can disable this special kind of alerts to omit them.

+4
source

Are you really back? and check the types and state of new_state and old_state. if you used: int new_state; and in the function compare_exchange (size_t & state, size_t new_state, size_t old_state) you will get this error, well I did :)

  state_data const current_state = interlocked_compare_exchange(&state,new_state,old_state); 

add:

  return new_state; 
0
source

All Articles