docs/style_guide: revert stance on non-type template args
Reverts our stance on non-type template argument style to be
consistent with the naming standard applied to other varibles whose
value is fixed for the duration of the program, namely kCamelCase.
Change-Id: If3309ca63199cebaf24d058b82296000abf05a45
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/39660
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
Pigweed-Auto-Submit: Ewout van Bekkum <ewout@google.com>
Reviewed-by: Keir Mierle <keir@google.com>
Reviewed-by: Wyatt Hepler <hepler@google.com>
diff --git a/docs/style_guide.rst b/docs/style_guide.rst
index 1087c51..3d04581 100644
--- a/docs/style_guide.rst
+++ b/docs/style_guide.rst
@@ -250,15 +250,18 @@
* If private code must be exposed in a header file, it must be in a namespace
nested under ``pw``. The namespace may be named for its subsystem or use a
name that designates it as private, such as ``internal``.
- * Template arguments for non-type names (e.g. ``template <int foo_bar>``)
- should follow the variable naming convention, which means snake case (e.g.
- ``foo_bar``). This matches the Google C++ style, however the wording in the
- official style guide isn't explicit and could be interpreted to use
- ``kFooBar`` style naming. Wide practice establishes that the naming
- convention is ``snake_case``, and so that is the style we use in Pigweed.
+ * Template arguments for non-type names (e.g. ``template <int kFooBar>``)
+ should follow the constexpr and const variable Google naming convention,
+ which means k prefixed camel case (e.g.
+ ``kCamelCase``). This matches the Google C++ style for variable naming,
+ however the wording in the official style guide isn't explicit for template
+ arguments and could be interpreted to use ``foo_bar`` style naming.
+ For consistency with other variables whose value is always fixed for the
+ duration of the program, the naming convention is ``kCamelCase``, and so
+ that is the style we use in Pigweed.
**Note:** At time of writing much of Pigweed incorrectly follows the
- ``kCamelCase`` naming for non-type template arguments. This is a bug that
+ ``snake_case`` naming for non-type template arguments. This is a bug that
will be fixed eventually.
**C code**