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

@@ -116,9 +116,9 @@ Ultrasonic::Ultrasonic(uint32_t pingChannel, uint32_t echoChannel,
* determine the range.
* @param units The units returned in either kInches or kMilliMeters
*/
[[deprecated(
DEPRECATED(
"Raw pointers are deprecated; prefer either specifying the channel numbers "
"as integers or passing shared_ptrs.")]]
"as integers or passing shared_ptrs.")
Ultrasonic::Ultrasonic(DigitalOutput *pingChannel, DigitalInput *echoChannel,
DistanceUnit units)
: m_pingChannel(pingChannel, NullDeleter<DigitalOutput>()),
@@ -142,9 +142,9 @@ Ultrasonic::Ultrasonic(DigitalOutput *pingChannel, DigitalInput *echoChannel,
* determine the range.
* @param units The units returned in either kInches or kMilliMeters
*/
[[deprecated(
DEPRECATED(
"References are deprecated; prefer either specifying the channel numbers "
"as integers or passing shared_ptrs.")]]
"as integers or passing shared_ptrs.")
Ultrasonic::Ultrasonic(DigitalOutput &pingChannel, DigitalInput &echoChannel,
DistanceUnit units)
: m_pingChannel(&pingChannel, NullDeleter<DigitalOutput>()),