What is 'required from here' error

后端 未结 2 1436
长情又很酷
长情又很酷 2021-01-04 13:33

It is in my Eclipse Problems view. The code compiles fine but there is an error saying \"required from here\", pointing to some boost header file and to the lin

2条回答
  •  长情又很酷
    2021-01-04 13:45

    Did you actually returned? and check the types &state 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 get this error, well i did :)

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

    add:

          return new_state;
    

提交回复
热议问题