From b729e3cfe3d79b5153d09f5d1bd6f8aad18d82d5 Mon Sep 17 00:00:00 2001 From: mmentovai Date: Tue, 10 Aug 2010 18:40:41 +0000 Subject: [PATCH] Update C++ style guide to 3.171: - Add a section to specify deprecation comments. --- cppguide.xml | 41 +++++++++++++++++++++++++++++++++++++++-- pyguide.html | 2 +- 2 files changed, 40 insertions(+), 3 deletions(-) diff --git a/cppguide.xml b/cppguide.xml index 28b54f5..2ef0f43 100644 --- a/cppguide.xml +++ b/cppguide.xml @@ -4,7 +4,7 @@

-Revision 3.170 +Revision 3.171

@@ -3477,6 +3477,43 @@ Tashana Landray + + + Mark deprecated interface points with DEPRECATED comments. + + +

+ You can mark an interface as deprecated by writing a comment containing + the word DEPRECATED in all caps. The comment goes either + before the declaration of the interface or on the same line as the + declaration. +

+ +

+ After the word DEPRECATED, write your name, e-mail address, + or other identifier in parentheses. +

+

+ A deprecation comment must include simple, clear directions for people to + fix their callsites. In C++, you can implement a deprecated function as + an inline function that calls the new interface point. +

+

+ Marking an interface point DEPRECATED will not magically + cause any callsites to change. If you want people to actually stop using + the deprecated facility, you will have to fix the callsites yourself or + recruit a crew to help you. +

+

+ New code should not contain calls to deprecated interface points. Use + the new interface point instead. If you cannot understand the + directions, find the person who created the deprecation and ask them for + help using the new interface point. +

+ + +
+ @@ -4514,7 +4551,7 @@ Tashana Landray

-Revision 3.170 +Revision 3.171

diff --git a/pyguide.html b/pyguide.html index 8048e30..23939e1 100644 --- a/pyguide.html +++ b/pyguide.html @@ -1,7 +1,7 @@ - Google Python Style Guide +