diff options
Diffstat (limited to 'options')
-rw-r--r-- | options/tie.hpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/options/tie.hpp b/options/tie.hpp index 16bf51d4..dffc6306 100644 --- a/options/tie.hpp +++ b/options/tie.hpp @@ -58,11 +58,6 @@ void tie_setting(value<t>& v, QLabel* lb, const QString& format, const xs&... ar v.SAFE_CONNTYPE); } -// Clang 3.9 has a bug -// error: missing default argument on parameter 'args' - -// cf. http://stackoverflow.com/questions/29098835/can-parameter-pack-function-arguments-be-defaulted - template<typename t, typename F, typename... xs> decltype((void)((std::declval<F>())(std::declval<const t&>()))) tie_setting(value<t>& v, QLabel* lb, F&& fun, const QString& fmt, const xs&... args) @@ -75,6 +70,13 @@ tie_setting(value<t>& v, QLabel* lb, F&& fun, const QString& fmt, const xs&... a v.SAFE_CONNTYPE); } +template<typename t, typename F, typename... xs> +decltype((void)((std::declval<F>())(std::declval<const t&>()))) +tie_setting(value<t>& v, QLabel* lb, F&& fun) +{ + tie_setting(v, lb, fun, QStringLiteral("%1")); +} + OTR_OPTIONS_EXPORT void tie_setting(value<int>& v, QComboBox* cb); OTR_OPTIONS_EXPORT void tie_setting(value<QString>& v, QComboBox* cb); OTR_OPTIONS_EXPORT void tie_setting(value<QVariant>& v, QComboBox* cb); |