# "Invalid operands" error after JUCE 5.3.2 update

**URL:** <https://forum.juce.com/t/invalid-operands-error-after-juce-5-3-2-update/27626>\
**Category:** General JUCE discussion\
**Created:** [May 11, 2018, 9:13am UTC](https://forum.juce.com/t/invalid-operands-error-after-juce-5-3-2-update/27626 "2018-05-11T09:13:56Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![joe-04-04](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/joe-04-04/32/2566_2.png) [@joe-04-04](https://forum.juce.com/u/joe-04-04)\
**Post date:** [May 11, 2018, 9:13am UTC](https://forum.juce.com/t/invalid-operands-error-after-juce-5-3-2-update/27626/1 "2018-05-11T09:13:56Z")

</div>

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.

 ![36%20AM](https://us1.discourse-cdn.com/flex026/uploads/juce/original/2X/0/0aad8118956f9237e83effd69afe751e388a977f.png)

---

<div class="post-metadata">

**Author:** ![ed95](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/ed95/32/7635_2.png) [@ed95](https://forum.juce.com/u/ed95)\
**Post date:** [May 11, 2018, 9:39am UTC](https://forum.juce.com/t/invalid-operands-error-after-juce-5-3-2-update/27626/2 "2018-05-11T09:39:49Z")

</div>

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())`

---

<div class="post-metadata">

**Author:** ![matthieu-brucher](https://avatars.discourse-cdn.com/v4/letter/m/a5b964/32.png) [@matthieu-brucher](https://forum.juce.com/u/matthieu-brucher)\
**Post date:** [May 11, 2018, 5:25pm UTC](https://forum.juce.com/t/invalid-operands-error-after-juce-5-3-2-update/27626/3 "2018-05-11T17:25:33Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![joe-04-04](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/joe-04-04/32/2566_2.png) [@joe-04-04](https://forum.juce.com/u/joe-04-04)\
**Post date:** [May 11, 2018, 5:51pm UTC](https://forum.juce.com/t/invalid-operands-error-after-juce-5-3-2-update/27626/4 "2018-05-11T17:51:46Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![joe-04-04](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/joe-04-04/32/2566_2.png) [@joe-04-04](https://forum.juce.com/u/joe-04-04)\
**Post date:** [May 12, 2018, 5:29am UTC](https://forum.juce.com/t/invalid-operands-error-after-juce-5-3-2-update/27626/5 "2018-05-12T05:29:34Z")

</div>

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

“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.”

> **[Coding Standards | JUCE](https://juce.com/discover/stories/coding-standards)**
>
> Deliver music applications on all main platforms, with high performances and professional tools

---

<div class="post-metadata">

**Author:** ![joe-04-04](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/joe-04-04/32/2566_2.png) [@joe-04-04](https://forum.juce.com/u/joe-04-04)\
**Post date:** [May 20, 2018, 8:55am UTC](https://forum.juce.com/t/invalid-operands-error-after-juce-5-3-2-update/27626/6 "2018-05-20T08:55:59Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ed95](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/ed95/32/7635_2.png) [@ed95](https://forum.juce.com/u/ed95)\
**Post date:** [May 20, 2018, 9:12am UTC](https://forum.juce.com/t/invalid-operands-error-after-juce-5-3-2-update/27626/7 "2018-05-20T09:12:39Z")

</div>

It was - [here](https://github.com/WeAreROLI/JUCE/commit/0f94dbbf961c41bbeae143ffd42625990a0cc5bd). You’ll need to rebuild the Projucer.
