Skip to content

Commit

Permalink
MSVC: __declspec(deprecated) does not work for typedefs
Browse files Browse the repository at this point in the history
Signed-off-by: Matthias Kretz <kretz@kde.org>
  • Loading branch information
mattkretz committed Sep 20, 2016
1 parent c7c75c5 commit f74282e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion avx/vector.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ template <typename T> class Vector<T, VectorAbi::Avx>
using mask_type = typename traits_type::mask_type;
using Mask = mask_type;
using MaskType = mask_type;
using MaskArg Vc_DEPRECATED("Use MaskArgument instead.") = typename Mask::AsArg;
using MaskArg Vc_DEPRECATED_ALIAS("Use MaskArgument instead.") = typename Mask::AsArg;
using MaskArgument = typename Mask::AsArg;
using reference = Detail::ElementReference<Vector>;

Expand Down
4 changes: 4 additions & 0 deletions common/macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# define Vc_IS_LIKELY(x) __builtin_expect(x, 1)
# define Vc_RESTRICT __restrict__
# define Vc_DEPRECATED(msg)
# define Vc_DEPRECATED_ALIAS(msg)
# define Vc_WARN_UNUSED_RESULT __attribute__((__warn_unused_result__))
#elif defined(__GNUC__)
# define Vc_UNREACHABLE __builtin_unreachable
Expand Down Expand Up @@ -112,8 +113,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# define Vc_RESTRICT __restrict__
# ifdef Vc_ICC
# define Vc_DEPRECATED(msg)
# define Vc_DEPRECATED_ALIAS(msg)
# else
# define Vc_DEPRECATED(msg) __attribute__((__deprecated__(msg)))
# define Vc_DEPRECATED_ALIAS(msg) __attribute__((__deprecated__(msg)))
# endif
# define Vc_WARN_UNUSED_RESULT __attribute__((__warn_unused_result__))
#else
Expand Down Expand Up @@ -155,6 +158,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# define Vc_IS_LIKELY(x) x
# define Vc_RESTRICT __restrict
# define Vc_DEPRECATED(msg) __declspec(deprecated(msg))
# define Vc_DEPRECATED_ALIAS(msg)
# define Vc_WARN_UNUSED_RESULT
#endif

Expand Down

0 comments on commit f74282e

Please sign in to comment.