C++14 introduced the [[deprecated]] attribute that can be used to mark symbols as deprecated, resulting in a warning from the compiler when the symbol is used.
Additional text can be included with the attribute and will be visible as part of the generated warning.