Move the Q_DECL_UNUSED attribute elsewhere to satisfy ICC 17

It doesn't like the attribute there. I think it's a compiler bug, but I
can't be sure because the part of the standard dealing with the
placement of attributes and where they apply is very complex. Exercise
left for the reader to determine if ICC is correct or not to reject it
there.

Change-Id: I87e17314d8b24ae983b1fffd1454bde826b7bcf4
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
This commit is contained in:
Thiago Macieira 2016-06-03 22:43:03 -03:00 committed by Jani Heikkinen
parent 6a75daa99f
commit e454e986d5
1 changed files with 3 additions and 3 deletions

View File

@ -1080,9 +1080,9 @@ struct QOverload : QConstOverload<Args...>, QNonConstOverload<Args...>
};
#if defined(__cpp_variable_templates) && __cpp_variable_templates >= 201304 // C++14
template <typename... Args> Q_CONSTEXPR QOverload<Args...> qOverload Q_DECL_UNUSED = {};
template <typename... Args> Q_CONSTEXPR QConstOverload<Args...> qConstOverload Q_DECL_UNUSED = {};
template <typename... Args> Q_CONSTEXPR QNonConstOverload<Args...> qNonConstOverload Q_DECL_UNUSED = {};
template <typename... Args> Q_CONSTEXPR Q_DECL_UNUSED QOverload<Args...> qOverload = {};
template <typename... Args> Q_CONSTEXPR Q_DECL_UNUSED QConstOverload<Args...> qConstOverload = {};
template <typename... Args> Q_CONSTEXPR Q_DECL_UNUSED QNonConstOverload<Args...> qNonConstOverload = {};
#endif
#endif