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

@@ -39,11 +39,11 @@ AnalogAccelerometer::AnalogAccelerometer(int32_t channel) {
* @param channel The existing AnalogInput object for the analog input the
* accelerometer is connected to
*/
[[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.")
AnalogAccelerometer::AnalogAccelerometer(AnalogInput *channel)
: m_analogInput(channel, NullDeleter<AnalogInput>()) {
if (channel == nullptr) {