mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-02-02 03:20:06 +00:00
Fixed a compiler error in the DSP module when using clang C++17 support
This commit is contained in:
parent
269c1f27fd
commit
f0e035f742
1 changed files with 6 additions and 4 deletions
|
|
@ -72,12 +72,14 @@ struct WaveShaper
|
|||
};
|
||||
|
||||
//==============================================================================
|
||||
#if JUCE_CXX17_IS_AVAILABLE
|
||||
template <typename Functor>
|
||||
static WaveShaper<typename std::invoke_result<Functor>, Functor> CreateWaveShaper (Functor functionToUse) { return {functionToUse}; }
|
||||
#else
|
||||
// Although clang supports C++17, their standard library still has no invoke_result
|
||||
// support. Remove the "|| JUCE_CLANG" once clang supports this properly!
|
||||
#if (! JUCE_CXX17_IS_AVAILABLE) || JUCE_CLANG
|
||||
template <typename Functor>
|
||||
static WaveShaper<typename std::result_of<Functor>, Functor> CreateWaveShaper (Functor functionToUse) { return {functionToUse}; }
|
||||
#else
|
||||
template <typename Functor>
|
||||
static WaveShaper<typename std::invoke_result<Functor>, Functor> CreateWaveShaper (Functor functionToUse) { return {functionToUse}; }
|
||||
#endif
|
||||
|
||||
} // namespace dsp
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue