1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-24 01:54:22 +00:00

ProcessorChain: Add support for C++17 structured bindings

This commit is contained in:
reuk 2021-08-17 19:33:35 +01:00
parent 930a3299f2
commit fbe446eac0
No known key found for this signature in database
GPG key ID: 9ADCD339CFC98A11

View file

@ -156,3 +156,20 @@ inline bool isBypassed (const ProcessorChain<Processors...>& chain) noexcept
} // namespace dsp
} // namespace juce
namespace std
{
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wmismatched-tags")
/** Adds support for C++17 structured bindings. */
template <typename... Processors>
struct tuple_size<::juce::dsp::ProcessorChain<Processors...>> : integral_constant<size_t, sizeof... (Processors)> {};
/** Adds support for C++17 structured bindings. */
template <size_t I, typename... Processors>
struct tuple_element<I, ::juce::dsp::ProcessorChain<Processors...>> : tuple_element<I, tuple<Processors...>> {};
JUCE_END_IGNORE_WARNINGS_GCC_LIKE
} // namespace std