# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
-# Feature that allows us to configure the maximal template instantiation depth
-# level allowed by a C++ compiler. Applies only to C++ toolsets whose compilers
-# actually support this configuration setting.
-#
-# Note that Boost Build currently does not allow defining features that take any
-# positive integral value as a parameter, which is what we need here, so we just
-# define some of the values here and leave it up to the user to extend this set
-# as he needs using the feature.extend rule.
-#
+import feature ;
+import numbers ;
+
+#| tag::doc[]
+
+[[bbv2.builtin.features.cpp-template-depth]]`c++-template-depth`::
+*Allowed values:* Any positive integer.
++
+Allows configuring a {CPP} compiler with the maximal template instantiation
+depth parameter. Specific toolsets may or may not provide support for this
+feature depending on whether their compilers provide a corresponding
+command-line option.
++
+NOTE: Due to some internal details in the current B2 implementation it
+is not possible to have features whose valid values are all positive integer.
+As a workaround a large set of allowed values has been defined for this feature
+and, if a different one is needed, user can easily add it by calling the
+feature.extend rule.
+
+|# # end::doc[]
+
# TODO: This should be upgraded as soon as Boost Build adds support for custom
# validated feature values or at least features allowing any positive integral
# value. See related Boost Build related trac ticket #194.
-#
-
-import feature ;
-import numbers ;
feature.feature c++-template-depth
: