Files
UltraGrid/gui/QT/util/overload.hpp
2019-05-21 10:33:46 +02:00

24 lines
388 B
C++

#ifndef OVERLOAD_HPP
#define OVERLOAD_HPP
#include <QtGlobal>
#if QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)
template<typename... Args>
using Overload = QOverload<Args...>;
#else
template<typename... Args>
struct Overload {
template<typename R, typename C>
static constexpr auto of(R (C::*ptr)(Args...)) noexcept -> decltype(ptr) {
return ptr;
}
};
#endif //QT_VERSION
#endif