Live build: no template named 'function' in namespace 'std'

stl
projucer

#1

I’m having trouble using Live build. I’m getting:

no template named ‘function’ in namespace ‘std’

This code works outside Live build. I’m including functional, so I’m not sure what the issue is. Perhaps it’s looking at an old version of libc++?

When I create a new project, I can use std::function.

Somewhat similar to: Live build and std::function

Thanks for any help!


#2

Which version of JUCE are you using? std::function isn’t available when using the live-build engine but there is a drop-in replacement in JUCE (in juce_core/misc/juce_StdFunctionCompat) that should be being used instead.


#3

Thanks for the help! I’m using JUCE v5.2.1.

I’m curious: what’s the story on not having std::function in the live build?