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:
Peter Johnson
2015-09-23 23:44:54 -07:00
committed by Brad Miller (WPI)
parent ef3fa53fc3
commit f64b055499
17 changed files with 92 additions and 92 deletions

View File

@@ -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>())) {}