I’ve followed this tutorial to update my Hello World-esque gain VST from using the now deprecated ScopedPointer to std::uniqe_ptr However, I’ve got a silly error that I can’t seem to figure out for my first big hurdle as a learner.
I’ve narrowed it down to the following line
mGainValue = std::make_unique<AudioProcessorValueTreeState::SliderAttachment> (new AudioProcessorValueTreeState::SliderAttachment(p.getAPVTS(), "gain", mGainSlider));
The error is here
Severity Code Description Project File Line Suppression State
Error C2664 ‘juce::AudioProcessorValueTreeState::SliderAttachment::SliderAttachment(const juce::AudioProcessorValueTreeState::SliderAttachment &)’: cannot convert argument 1 from ‘_Ty’ to ‘const juce::AudioProcessorValueTreeState::SliderAttachment &’ Hard Gainer_SharedCode C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\include\memory 2064
While I understand that there is a type mismatch, I don’t understand why I am receiving it or how to proceed. The guides I have seen do not have different code. So, please, if anyone could shed some light on how I’m being an idiot, I’d be most appreciative.