If I have a little peice o' code as such...
template <typename _T>
class Foo
{
public:
typedef const T& ParamType;
void DoStuff(ParamType thingy);
};
This can be non-optimal if sizeof(_T) <= sizeof(_T*).
Therefore, I want to have a conditional typedef. If the size of _T is less than or equal to that of a pointer, just pass it in by value. Otherwise, pass it by const reference. Is this possible? I hear all this stuff about templates being turing complete but this is hurting my head.