Note that standard-conforming allocators use many language features that are not yet widely implemented. In particular, they rely on member templates, partial specialization, partial ordering of function templates, the typename keyword, and the use of the template keyword to refer to a template member of a dependent type.
就是加粗部分,求解释,想不明白。
PHP中文网2017-04-17 15:32:35
The meaning of bold in this sentence is: the allocator consistent with the standard library relies on "partial ordering of function templates" and "the use of the template keyword to refer to a template member of a dependent type" a c++ feature.
Partial ordering actually needs to be done once when using a template. The template keyword is used in the rebind of the allocator. This sentence means that implementing an allocator that conforms to the standard cannot avoid these features, but these features are currently not very portable. (Refer to the year of the comment, I found the same comment in a cryengine, last updated in 2012)
When the same function template specialization matches more than one overloaded function template (this often results from template argument deduction), partial ordering of overloaded function templates is performed to select the best match.[ ...]
Refer to Function template overloading
Similarly, in a template definition, a dependent name that is not a member of the current instantiation is not considered to be a template name unless the disambiguation keyword template is used or unless it was already established as a template name :[...]
Refer to The template disambiguator for dependent names