From fbe446eac0cfcbc833769803f10d92f261432bf8 Mon Sep 17 00:00:00 2001 From: reuk Date: Tue, 17 Aug 2021 19:33:35 +0100 Subject: [PATCH] ProcessorChain: Add support for C++17 structured bindings --- .../juce_dsp/processors/juce_ProcessorChain.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/modules/juce_dsp/processors/juce_ProcessorChain.h b/modules/juce_dsp/processors/juce_ProcessorChain.h index 364bc25ddd..fd453d17f9 100644 --- a/modules/juce_dsp/processors/juce_ProcessorChain.h +++ b/modules/juce_dsp/processors/juce_ProcessorChain.h @@ -156,3 +156,20 @@ inline bool isBypassed (const ProcessorChain& chain) noexcept } // namespace dsp } // namespace juce + +namespace std +{ + +JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wmismatched-tags") + +/** Adds support for C++17 structured bindings. */ +template +struct tuple_size<::juce::dsp::ProcessorChain> : integral_constant {}; + +/** Adds support for C++17 structured bindings. */ +template +struct tuple_element> : tuple_element> {}; + +JUCE_END_IGNORE_WARNINGS_GCC_LIKE + +} // namespace std