C++14 introduces the [[deprecated]] attribute to indicate that a unit (function, class, etc.) is discouraged and likely yield compilation warnings. If a reason is provided, it will be included in the warnings.
[[deprecated]]
void old_method();
[[deprecated("Use new_method instead")]]
void legacy_method();