I am sure this is more of a C++11/C++14 question then a JUCE question.
I now want to make a copy of the contents of the currentSetup which is hanging off of
class JUCE_API AudioDeviceManager : public ChangeBroadcaster
In order to get access to it, one should clearly utilize:
AudioDeviceManager::AudioDeviceSetup AudioDeviceManager::getAudioDeviceSetup() const
Being an old school C/C++ programmer, I am quite confused by this.
currentSetup is a struct.
is returning the struct (which I have never seen before), not a pointer to the struct.
I am pretty sure this must be some sort of new C++11/C++14 type functionality that can only be understood by you youngsters! To be honest I do not understand it!
seems to ‘work’ (meaning it does not crash), but still seems wrong to me. In addition the above statement produces a
‘warning C4238: nonstandard extension used: class rvalue used as lvalue’ (Visual Studio 2017)
I understand that I am taking an address of an rvalue, which is in fact bad.
I do understand that I could pick of each member of currentSetup and assign the value to my
for each member, but this does not seem wise as I am sure that at some point members could be added to the AudioDeviceSetup class / struct in future releases and I would never be aware of it.
So, again, I really do not understand what is actually being returned by
I am hoping this does not sound like psychotic babble?
Thanks in advance for any direction.