JUCE containers and standard template library algorithms


#1

Many methods in JUCE return JUCE containers full of stuff. The JUCE containers (e.g. Array) do not seem to use iterators and thus do not play nice with STL algorithms (e.g. none_of, find_if etc.).

Am I plain wrong?
Am I missing a trick?
Is this a deliberate design consideration?
Is there a neat way to convert a JUCE container into some standard container type?

Many thanks!


#2

It’s really a bit of a historic thing - back when I started juce, the standard containers weren’t particularly “standard” so I wrote my own to avoid the mess of dealing with many conflicting implementations.

Recently though, now that the standard really is finally becoming ubiquitous, I have been retrofitting a few iterator functions, so the array classes now have begin()/end() to allow them to be used in std::algorithm classes, and the new C++11 range-based for loop, etc.


#3

Ah, cool! Keep up the good work :smiley: