Traits class

From Seo Wiki - Search Engine Optimization and Programming Languages

Jump to: navigation, search

In computer programming, a traits class is a class template template used to associate information or behaviour to a compile-time entity, typically a data type or a constant, without modifying the existing entity. In the C++ programming language, this is normally achieved by defining a primary class template, and creating explicit or partial specializations for the relevant types.


It is used in Standard Template Library and the C++ standard library to support generic container classes. The technique is used extensively in the Boost TypeTraits library.

External links

Personal tools

Served in 0.059 secs.