The String (bool) constructor and operator<< (String&, bool) have been explicitly deleted.
Possible Issues
Previous code which relied on an implicit bool to int type conversion to produce a String will not compile.
Workaround
Cast your bool to an integer to generate a string representation of it.
Rationale
Letting things implicitly convert to bool to produce a String opens the door to all kinds of nasty type conversion edge cases. Furthermore, before this change, MacOS would automatically convert bools to ints but this wouldn’t occur on different platforms. Now the behaviour is consistent across all operating systems supported by JUCE.
Has this been tested on Linux with ASIO enabled?
I’m getting these errors back from my build server:
Compiling include_juce_audio_processors.cpp
In file included from ../../../modules/juce/modules/juce_audio_devices/juce_audio_devices.cpp:200:0,
from ../../JuceLibraryCode/include_juce_audio_devices.cpp:9:
../../../modules/juce/modules/juce_audio_devices/native/juce_linux_ALSA.cpp: In constructor ‘juce::{anonymous}::ALSADevice::ALSADevice(const juce::String&, bool)’:
../../../modules/juce/modules/juce_audio_devices/native/juce_linux_ALSA.cpp:158:95: error: use of deleted function ‘juce::String& juce::operator<<(juce::String&, bool)’
JUCE_ALSA_LOG ("snd_pcm_open (" << deviceID.toUTF8().getAddress() << ", forInput=" << forInput << ")");
^
../../../modules/juce/modules/juce_audio_devices/native/juce_linux_ALSA.cpp:31:87: note: in definition of macro ‘JUCE_ALSA_LOG’
#define JUCE_ALSA_LOG(dbgtext) { juce::String tempDbgBuf ("ALSA: "); tempDbgBuf << dbgtext; Logger::writeToLog (tempDbgBuf); DBG (tempDbgBuf); }
^
In file included from ../../../modules/juce/modules/juce_core/juce_core.h:213:0,
from ../../../modules/juce/modules/juce_events/juce_events.h:50,
from ../../../modules/juce/modules/juce_audio_devices/juce_audio_devices.h:54,
from ../../../modules/juce/modules/juce_audio_devices/juce_audio_devices.cpp:46,
from ../../JuceLibraryCode/include_juce_audio_devices.cpp:9:
../../../modules/juce/modules/juce_core/text/juce_String.h:1349:32: note: declared here
JUCE_API String& JUCE_CALLTYPE operator<< (String&, bool) = delete;
^
In file included from ../../../modules/juce/modules/juce_audio_devices/juce_audio_devices.cpp:200:0,
from ../../JuceLibraryCode/include_juce_audio_devices.cpp:9:
../../../modules/juce/modules/juce_audio_devices/native/juce_linux_ALSA.cpp: In static member function ‘static juce::AudioData::Converter* juce::{anonymous}::ALSADevice::createConverter(bool, int, bool, bool, bool, int)’:
../../../modules/juce/modules/juce_audio_devices/native/juce_linux_ALSA.cpp:421:75: error: use of deleted function ‘juce::String& juce::operator<<(juce::String&, bool)’
JUCE_ALSA_LOG ("format: bitDepth=" << bitDepth << ", isFloat=" << isFloat
^
../../../modules/juce/modules/juce_audio_devices/native/juce_linux_ALSA.cpp:31:87: note: in definition of macro ‘JUCE_ALSA_LOG’
#define JUCE_ALSA_LOG(dbgtext) { juce::String tempDbgBuf ("ALSA: "); tempDbgBuf << dbgtext; Logger::writeToLog (tempDbgBuf); DBG (tempDbgBuf); }