Hi! I just upgraded to the last Juce version, and I have stuff that no longer compiles in VS2019. Can’t seem to figure out why. Here’s what I have:
I have a variable called ‘model’ that contains bits and pieces of my data model, declared with a smart pointer as follows
And now the following 2 lines no longer compile:
model.reset(AudioProcessor::getXmlFromBinary(data, sizeInBytes)); ... model.reset(XmlDocument::parse(f));
Both parse() and getXmlFromBinary() return a pointer to an XmlElement - model.reset() does not seem to accept this here and produces following error:
Error C2664 'void std::unique_ptr<juce::XmlElement,std::default_delete<_Ty>>::reset(juce::XmlElement *) noexcept': cannot convert argument 1 from 'std::unique_ptr<juce::XmlElement,std::default_delete<_Ty>>' to 'juce::XmlElement *'
Strangely, if I do something like the following, the compiler happily accepts that:
Anybody a clue what I’m doing wrong, and why this behavior ? Any clues would be appreciated!