mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-01 02:41:48 +00:00
Provide DEPRECATED macro as portable version of [[deprecated]].
The [[deprecated]] attribute is a C++14 feature not supported by MSVC or GCC < 4.9, but can be simulated on both of these compilers through the use of alternative (compiler-specific) attribute methods. Change-Id: I34aed5705db2407c592f7cabd5274358c48d34fe
This commit is contained in:
committed by
Brad Miller (WPI)
parent
ef3fa53fc3
commit
f64b055499
@@ -88,9 +88,9 @@ Gyro::Gyro(int32_t channel) {
|
||||
* @param channel A pointer to the AnalogInput object that the gyro is connected
|
||||
* to.
|
||||
*/
|
||||
[[deprecated(
|
||||
DEPRECATED(
|
||||
"Raw pointers are deprecated; consider calling the Gyro constructor with "
|
||||
"a channel number or passing a shared_ptr instead.")]]
|
||||
"a channel number or passing a shared_ptr instead.")
|
||||
Gyro::Gyro(AnalogInput *channel)
|
||||
: Gyro(std::shared_ptr<AnalogInput>(channel,
|
||||
NullDeleter<AnalogInput>())) {}
|
||||
|
||||
Reference in New Issue
Block a user