A Journey 2 Eternity

“deprecated” in C++ Builder

Posted on: November 23, 2011

We can deprecate a method, property, or even an entire class in C++ Builder, using the [[deprecated]] attribute. Deprecating an entity is a way of signalling to other developers that it should no longer be used, typically because there is another – more preferable – way of doing things.

When a deprecated entity is used in code, a compiler warning will be issued.

enum StatModelsType [[deprecated("Use StatisticalModelType instead.")]] {
smtNone = 0,
smtScanModel,
smtExFactoryModel,
smtOptimiserModel
};
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Pages

Categories

November 2011
M T W T F S S
« Jun   Dec »
 123456
78910111213
14151617181920
21222324252627
282930  

Blog Stats

  • 27,491 hits
%d bloggers like this: