WPILibC++ 2025.0.0-alpha-1-10-g1ccd8d1
deprecated.h
Go to the documentation of this file.
1// Copyright (c) FIRST and other WPILib contributors.
2// Open Source Software; you can modify and/or share it under the terms of
3// the WPILib BSD license file in the root directory of this project.
4
5#ifndef WPIUTIL_WPI_DEPRECATED_H_
6#define WPIUTIL_WPI_DEPRECATED_H_
7
8#ifndef WPI_IGNORE_DEPRECATED
9#ifdef __GNUC__
10#define WPI_IGNORE_DEPRECATED \
11 _Pragma("GCC diagnostic push") \
12 _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
13#elif defined(_WIN32)
14#define WPI_IGNORE_DEPRECATED _Pragma("warning(disable : 4996)")
15#else
16#define WPI_IGNORE_DEPRECATED
17#endif
18
19#endif
20
21#ifndef WPI_UNIGNORE_DEPRECATED
22#ifdef __GNUC__
23#define WPI_UNIGNORE_DEPRECATED _Pragma("GCC diagnostic pop")
24#elif defined(_WIN32)
25#define WPI_UNIGNORE_DEPRECATED _Pragma("warning(default : 4996)")
26#else
27#define WPI_UNIGNORE_DEPRECATED
28#endif
29#endif
30
31#endif // WPIUTIL_WPI_DEPRECATED_H_