D
david.corby
Hi again everyone!
I was wondering if there is any way to specify a return type for a
template class member function that is typedef'd in the class. I.E...
template <class T> class A {
public:
typedef int TD;
private:
TD b ();
};
template <class T> A<T>::TD b () {
// Do stuff.
}
I know this won't compile, but hopefully you can see what I'm trying to
do. The type TD will only be used in-class. I know I can stick the
typedef outside of the class, but I'd like to not pollute that
namespace.
Is there any way to make this work? I'm fairly certain I've done it on
non-templated classes.
Thanks!
Dave Corby
I was wondering if there is any way to specify a return type for a
template class member function that is typedef'd in the class. I.E...
template <class T> class A {
public:
typedef int TD;
private:
TD b ();
};
template <class T> A<T>::TD b () {
// Do stuff.
}
I know this won't compile, but hopefully you can see what I'm trying to
do. The type TD will only be used in-class. I know I can stick the
typedef outside of the class, but I'd like to not pollute that
namespace.
Is there any way to make this work? I'm fairly certain I've done it on
non-templated classes.
Thanks!
Dave Corby