A
Alan Woodland
Hi,
I don't think I can't do this directly with standard C++, I've tried all
the ways I could think of that make sense and then some. I was wondering
if someone had a genius idea how I could produce behavior, using
standard C++, akin to what I guess can be best called a "typedef
specializations".
I.e. this being the default:
template <typename _T> class Foo {
public:
typedef _T type;
};
but in some cases (say _T is int) I want type to be a typedef for double
instead of int.
I've found loads of info on typedef templates, but this isn't quite the
same issue.
Any thoughts?
Thanks,
Alan
I don't think I can't do this directly with standard C++, I've tried all
the ways I could think of that make sense and then some. I was wondering
if someone had a genius idea how I could produce behavior, using
standard C++, akin to what I guess can be best called a "typedef
specializations".
I.e. this being the default:
template <typename _T> class Foo {
public:
typedef _T type;
};
but in some cases (say _T is int) I want type to be a typedef for double
instead of int.
I've found loads of info on typedef templates, but this isn't quite the
same issue.
Any thoughts?
Thanks,
Alan