1# Copyright 2017 Rene Rivera 2# Distributed under the Boost Software License, Version 1.0. 3# (See accompanying file LICENSE_1_0.txt or copy at 4# http://www.boost.org/LICENSE_1_0.txt) 5 6import feature ; 7import numbers ; 8 9#| tag::doc[] 10 11[[bbv2.builtin.features.cpp-template-depth]]`c++-template-depth`:: 12*Allowed values:* Any positive integer. 13+ 14Allows configuring a {CPP} compiler with the maximal template instantiation 15depth parameter. Specific toolsets may or may not provide support for this 16feature depending on whether their compilers provide a corresponding 17command-line option. 18+ 19NOTE: Due to some internal details in the current B2 implementation it 20is not possible to have features whose valid values are all positive integer. 21As a workaround a large set of allowed values has been defined for this feature 22and, if a different one is needed, user can easily add it by calling the 23feature.extend rule. 24 25|# # end::doc[] 26 27# TODO: This should be upgraded as soon as Boost Build adds support for custom 28# validated feature values or at least features allowing any positive integral 29# value. See related Boost Build related trac ticket #194. 30 31feature.feature c++-template-depth 32 : 33 [ numbers.range 64 1024 : 64 ] 34 [ numbers.range 20 1000 : 10 ] 35 # Maximum template instantiation depth guaranteed for ANSI/ISO C++ 36 # conforming programs. 37 17 38 : 39 incidental optional propagated ; 40