|
FreePOOMA
2.4.1
|
The point of this class is to be a number of type T which is known at compile time to be one. More...
#include <One.h>
Public Member Functions | |
| operator T () const | |
| If you need to convert to an object of type T, just build one from one. | |
| bool | operator== (const One< T > &) const |
| One () | |
| Give it empty ctors and assignment operators to try and keep purify happy. | |
| One (const One< T > &) | |
| One< T > & | operator= (const One< T > &) |
The point of this class is to be a number of type T which is known at compile time to be one.
This is reflected in the operations like multiplication and division that use it. If you return a One object, the compiler should be able to make better optimizations than if you just return one. One is templated on type T, to represent a one object of type T. Type T is required to be constructable from an integer one.
Give it empty ctors and assignment operators to try and keep purify happy.
| One< T >::operator T | ( | ) | const [inline] |
If you need to convert to an object of type T, just build one from one.
This will be used in the cases where the operators below don't match.
1.7.6.1