Juce include file error

After making a number of changes for the latest build of my Juce audio application, I tried rebuilding the code on Windows in Visual Stdio 2019, and I encountered the following build error:

Severity Code Description Project File Line Suppression State
Error C2664 ‘void juce::ArrayBase<ElementType,TypeOfCriticalSectionToUse>::addAssumingCapacityIsReady(ElementType &&)’: cannot convert argument 1 from ‘const ElementType’ to ‘const ElementType &’ VolimeMixer_App D:\Dev\X-platform\Libs\Juce\Modules\juce_core\containers\juce_ArrayBase.h 311

juce_ArrayBase.h is apparently a file that is being included through some convoluted path in my code, and I am not getting an error with a base class in that module.

I am also getting an error on the Mac OSX Xcoder build, but that error message is even more vague and useless.

Any suggestions on how I might track down what it is in my code that is causing this error???

are there more lines that precede/follow that error? ie. a line that indicates a place in your code that this error originates?

Looks like you’re calling addArray someplace with an incorrect argument for the array you’re passing. That error shows the function being called as taking an “ElementType &&” type, but line 311 actually calls the function whose argument is “const ElementType &”, which is what the error says is the type of the first argument. Not sure why your compiler is showing the other function signature. But the problem is coming from a call to addArray(). You might have declared the wrong type for the array.

But as htartisan suggested, it would help to examine the other compiler output lines immediately prior to (and after) that line.

Never mind. I found it. Thanks anyhow.