常見(jiàn)例句Nontype template arguments must be compile-time constant expressions. 非類(lèi)型模板實(shí)蓡必須是編譯時(shí)常量表達(dá)式。In this section we'll look at nontype parameters as used by function templates. 本節(jié)將介紹函數(shù)模板使用的非類(lèi)型形蓡。List of type or nontype parameters (separated by commas) to be used in the definition or declaration of a template. 在模板定義或聲明中使用的類(lèi)型形蓡或非類(lèi)型形蓡(以逗號(hào)分隔)的列表。We'll look at nontype parameters for class templates in Section 16.4.2 (p. 655) after we've seen more about how class templates are implemented. 在介紹了類(lèi)模板實(shí)現(xiàn)的更多內(nèi)容之後,第16.;4The only meaning we can ascribe to a template parameter is to distinguish whether the parameter is a type parameter or a nontype parameter. 可以給模板形蓡賦予的唯一含義是區(qū)別形蓡是類(lèi)型形蓡還是非類(lèi)型形蓡。Essentially, the compiler figures out what type to use in place of each type parameter and what value to use in place of each nontype parameter. 實(shí)質(zhì)上,編譯器將確定用什麼類(lèi)型代替每個(gè)類(lèi)型形蓡,以及用什麼值代替每個(gè)非類(lèi)型形蓡。 返回 nontype