Elm  2
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
StrongType Class Reference

Detailed Description

Type definition based on scalar types (bool, int, char, etc) are really just type aliases that does not support type identification in function overloading resolution.

For instance, the standard int displayed will be called instead of the specialized displayer: <code c++> typedef int index_t; io::Output& operator<<(index_t i) { ... }

index_t i; cout << i;

To prevent this, one can use the class to make index_t a strong type but index_t can still be used as a normal integer: <code c++> typedef StrongType<int> index_t; io::Output& operator<<(index_t i) { ... }

index_t i; cout << i;

Parameters
TEmbedded type. @seealso SolidType

The documentation for this class was generated from the following file: