Files Classes Functions Hierarchy
#include <typeop.h>
Public Types | |
| typedef T | Targ |
| typedef T | Tbare |
| typedef T const | Tconst |
| typedef T & | Tref |
| typedef T & | Tbareref |
| typedef T const & | Tconstref |
| typedef T * | Tptr |
| typedef T * | Tbareptr |
| typedef T const * | Tconstptr |
At compile time templates type can be extracted or manipulated. This is critical in using template techniques.
For example removing a reference of a template argument to use the type to access the classes typedef template declaration.
template< typename FN, typename XI, typename T >
class explore
{
public:
typedef T Ttype;
...
template< typename EXP >
class pattern
{
...
// Strip away the reference in EXP if it exists.
cirbuffarr< typename typeop<EXP>::Tbare::Ttype > xi0;
...
};
// Use of a reference causes compiler problems as a type.
pattern< explore<parab2 &,double*,double> & > pat(g);
Definition at line 42 of file typeop.h.
1.5.8