Opened 13 years ago

Closed 13 years ago

#367 closed request (fixed)

preprocessor guards for deprecated functions

Reported by: Peter Owned by: Peter
Priority: minor Milestone: yat 0.5
Component: build Version: trunk
Keywords: Cc:


I would like to have preprocessor guards to surround deprecated functions. The user can then, by setting an appropriate flag, test if he is using any deprecated function. Obviously, we should always use this flag internally so we are not using any functions that we have flagged as deprecated.

Change History (4)

comment:1 Changed 13 years ago by Peter

GSL calls it macro GSL_DISABLE_DEPRECATED, so to be inline with that naming I think we can go with YAT_DISABLE_DEPRECATED.

The description is stupid though, because it says we should build the library without deprecated functions. All functions must be compiled into the lib.

comment:2 Changed 13 years ago by Peter

Owner: changed from Jari Häkkinen to Peter
Status: newassigned

comment:3 Changed 13 years ago by Peter

Have a look at solution in libpqxx

comment:4 Changed 13 years ago by Peter

Resolution: fixed
Status: assignedclosed

(In [1500]) Added structure to deprecate functions. I chose to use a gcc style, and it is tested in configure whether the compiler supports it. If not the deprecation has no effect. Using a deprecated function will cause a compiler warning. In gcc the warning can be turned off with '-Wno-deprecated'. Possibly we should turn off the warning by default, so a user has to turn it on by defining -DYAT_DISABLE_DEPRECATED...

fixes #367

Note: See TracTickets for help on using tickets.