mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-05 03:21:42 +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
@@ -26,11 +26,11 @@ class AnalogAccelerometer : public SensorBase,
|
||||
public LiveWindowSendable {
|
||||
public:
|
||||
explicit AnalogAccelerometer(int32_t channel);
|
||||
[[deprecated(
|
||||
DEPRECATED(
|
||||
"Raw pointers are deprecated; if you just want to construct an "
|
||||
"AnalogAccelerometer with its own AnalogInput, then call the "
|
||||
"AnalogAccelerometer(int channel). If you want to keep your own copy of "
|
||||
"the AnalogInput, use std::shared_ptr.")]]
|
||||
"the AnalogInput, use std::shared_ptr.")
|
||||
explicit AnalogAccelerometer(AnalogInput *channel);
|
||||
explicit AnalogAccelerometer(std::shared_ptr<AnalogInput> channel);
|
||||
virtual ~AnalogAccelerometer() = default;
|
||||
|
||||
Reference in New Issue
Block a user