Advertisement
Guest User

Untitled

a guest
Jul 17th, 2012
289
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.16 KB | None | 0 0
  1. Document number: Nnnnn=yy-nnnn
  2. Date: 2012-07-18
  3. Project: Programming Language C++, Language Working Group
  4. Reply-to: Martinho Fernandes <martinho dot fernandes at gmail dot com>
  5.  
  6. I. Table of Contents
  7.  
  8. II. Introduction
  9.  
  10. This documents describes a proposal for providing authors of C++ libraries with a standard facility to mark code entities as deprecated.
  11.  
  12. III. Motivation and Scope
  13.  
  14. Libraries change with time. Sometimes features are replaced by more powerful ones, or are found to be inherently flawed. A common way for library writers to deal with this problem is to recommend against such old features, i.e., to mark them as deprecated.
  15.  
  16. Right now there is no standard means of doing that. Library writers are thus forced to either simply document them as deprecated, or to use the preprocessor to decide upon one of the various compiler extensions that exist to support this feature.
  17.  
  18. At least three major compilers support this feature as an extension: MSVC uses __declspec(deprecated), GCC and Clang use __attribute__((deprecated)).
  19.  
  20. This proposal is intended to standardize the various attributes provided by compilers for feature deprecation.
  21.  
  22. IV. Impact On the Standard
  23.  
  24. This proposal has little impact on the current standard, as it consists solely of the addition of an attribute, which, has intended for attributes, does not change program semantics.
  25.  
  26. V. Design Decisions
  27.  
  28. Why did you choose the specific design that you did? What alternatives did you consider, and what are the tradeoffs? What are the consequences of your choice, for users and implementers? What decisions are left up to implementers? If there are any similar libraries in use, how do their design decisions compare to yours?
  29.  
  30. VI. Technical Specifications
  31.  
  32. This feature consists of a simple attribute named `deprecated` that can be applied to most code entities that an attribute can be applied to. The only exceptions are function parameters.
  33.  
  34. Implementations can ignore this attribute without any change in program semantics, because it is merely informative. They are however, encouraged to emit warnings whenever an entity marked deprecated is used in a program.
  35.  
  36. VII. References
  37.  
  38. blah blah
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement