"Invalid operands" error after JUCE 5.3.2 update

I believe this is auto-generated code from the previous JUCE version I was using, but don’t recall (maybe I manually copied and pasted this from elsewhere). I’m unfamiliar with std::unique_ptr, so any quick tips for this issue would be greatly appreciated.

It looks like the Label::Listener autogenerated code is missing a .get(). I’ll add that.

For now, you can fix this by changing if (labelThatHasChanged == bpmValuesLabel) to if (labelThatHasChanged == bpmValuesLabel.get())

Get used to std::unique_ptr as soon as you can, it’s part of C++11 101.

Yeah, I never used it because I always only use raw C++ pointers or one of the JUCE template pointers, never had a need to use the C++ template ones.

@jules, now that this change has been made in the codebase, this bullet point might need updated :slight_smile:

“The juce::ScopedPointer class was written to be compatible with pre-C++11 compilers, so although it does offer C++11 move functionality for supported compilers, it’s not as versatile as std::unique_ptr. So if you can use std::unique_ptr in your own code, that’s probably a better bet. We may eventually migrate the JUCE codebase to std::unique_ptr.”

Is it possible to have this committed into the codebase? The temp fix is fine, but whenever I change something in the GUI and save with the Projucer, the .get() is removed and it has to be manually inserted again.

It was - here. You’ll need to rebuild the Projucer.