Remove pre-C++17 shims (#1752)

Now that all compilers support C++17, remove some old C++14/C++17 shims.
This commit is contained in:
Peter Johnson
2019-07-07 15:44:43 -07:00
committed by GitHub
parent ea9512977c
commit 8757bc471b
16 changed files with 71 additions and 271 deletions

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2015-2018 FIRST. All Rights Reserved. */
/* Copyright (c) 2015-2019 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
@@ -8,26 +8,8 @@
#ifndef WPIUTIL_WPI_DEPRECATED_H_
#define WPIUTIL_WPI_DEPRECATED_H_
// [[deprecated(msg)]] is a C++14 feature not supported by MSVC or GCC < 4.9.
// We provide an equivalent warning implementation for those compilers here.
#ifndef WPI_DEPRECATED
#if defined(_MSC_VER)
#define WPI_DEPRECATED(msg) __declspec(deprecated(msg))
#elif defined(__GNUC__)
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 8)
#if __cplusplus > 201103L
#define WPI_DEPRECATED(msg) [[deprecated(msg)]]
#else
#define WPI_DEPRECATED(msg) [[gnu::deprecated(msg)]]
#endif
#else
#define WPI_DEPRECATED(msg) __attribute__((deprecated(msg)))
#endif
#elif __cplusplus > 201103L
#define WPI_DEPRECATED(msg) [[deprecated(msg)]]
#else
#define WPI_DEPRECATED(msg) /*nothing*/
#endif
#endif
#endif // WPIUTIL_WPI_DEPRECATED_H_