Develop Biology
The language of life
|
#include <ostream>
Go to the source code of this file.
Macros | |
#define | BIO_STRONG_TYPEDEF(type, name, defaultValue) |
#define BIO_STRONG_TYPEDEF | ( | type, | |
name, | |||
defaultValue | |||
) |
Another problem with C++: the "typedef" keyword does not create a distinct type, only an alias. Thus 2 identical typedefs of different names become merged into the same symbol at compile time.
Here, we work around this bug by creating a wrapper class that does nothing but contain another value. Unfortunately, operator type() alone is not sufficient to treat this new class as the type it holds and we must instead forward all operations to the contained type. ugh. If you know of a better solution to this problem, please make a pull request.
This wrapper is currently not virtual and cannot be inherited from. This may change in a future release.
Definition at line 37 of file StrongTypedef.h.