Browse Source

Fix NullCheckedInvocation::invoke() std::function signature to allow non-forwarding references

v6.1.6
ed 3 years ago
parent
commit
fcb4a8adb3
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      modules/juce_core/misc/juce_Functional.h

+ 1
- 1
modules/juce_core/misc/juce_Functional.h View File

@@ -34,7 +34,7 @@ namespace juce
struct NullCheckedInvocation struct NullCheckedInvocation
{ {
template <typename... Signature, typename... Args> template <typename... Signature, typename... Args>
static void invoke (std::function<Signature...>&& fn, Args&&... args)
static void invoke (const std::function<Signature...>& fn, Args&&... args)
{ {
if (fn != nullptr) if (fn != nullptr)
fn (std::forward<Args> (args)...); fn (std::forward<Args> (args)...);


Loading…
Cancel
Save