在C++編程語言的340頁:特別版,斯特勞斯寫道...默認模板的語義檢查參數
The semantic checking of a default argument for a template parameter is done if and (only) when that default argument is actually used. In particular, as long as we refrain from using the default template argument Cmp<T> we can compare() strings of a type for which Cmp<X> wouldn't compile (say, because < wasn't defined for an X). This point is crucial in the design of the standard containers, which rely on a template argument to specify default values.
我有麻煩纏繞我的頭圍繞這一用法。爲什麼這個規則允許比較類型X的字符串,通常情況下它不會被編譯?這種行爲不會不受歡迎嗎?