2020-12-26 14:12:05 -08:00
|
|
|
// Copyright (c) FIRST and other WPILib contributors.
|
|
|
|
|
// Open Source Software; you can modify and/or share it under the terms of
|
|
|
|
|
// the WPILib BSD license file in the root directory of this project.
|
2016-11-03 20:08:47 -07:00
|
|
|
|
2018-05-13 17:09:56 -07:00
|
|
|
#ifndef WPIUTIL_WPI_DEPRECATED_H_
|
|
|
|
|
#define WPIUTIL_WPI_DEPRECATED_H_
|
2016-11-03 20:08:47 -07:00
|
|
|
|
|
|
|
|
#ifndef WPI_DEPRECATED
|
2017-10-21 20:31:20 -07:00
|
|
|
#define WPI_DEPRECATED(msg) [[deprecated(msg)]]
|
2016-11-03 20:08:47 -07:00
|
|
|
#endif
|
|
|
|
|
|
2022-05-24 13:56:48 -07:00
|
|
|
#ifndef WPI_IGNORE_DEPRECATED
|
|
|
|
|
#ifdef __GNUC__
|
|
|
|
|
#define WPI_IGNORE_DEPRECATED \
|
|
|
|
|
_Pragma("GCC diagnostic push") \
|
|
|
|
|
_Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
|
|
|
|
|
#elif defined(_WIN32)
|
|
|
|
|
#define WPI_IGNORE_DEPRECATED _Pragma("warning(disable : 4996)")
|
2023-10-05 00:49:07 -04:00
|
|
|
#else
|
|
|
|
|
#define WPI_IGNORE_DEPRECATED
|
2022-05-24 13:56:48 -07:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifndef WPI_UNIGNORE_DEPRECATED
|
|
|
|
|
#ifdef __GNUC__
|
|
|
|
|
#define WPI_UNIGNORE_DEPRECATED _Pragma("GCC diagnostic pop")
|
|
|
|
|
#elif defined(_WIN32)
|
|
|
|
|
#define WPI_UNIGNORE_DEPRECATED _Pragma("warning(default : 4996)")
|
2023-10-05 00:49:07 -04:00
|
|
|
#else
|
|
|
|
|
#define WPI_UNIGNORE_DEPRECATED
|
2022-05-24 13:56:48 -07:00
|
|
|
#endif
|
|
|
|
|
#endif
|
|
|
|
|
|
2018-05-13 17:09:56 -07:00
|
|
|
#endif // WPIUTIL_WPI_DEPRECATED_H_
|