template typename question
Posted
by stephenteh
on Stack Overflow
See other posts from Stack Overflow
or by stephenteh
Published on 2010-03-23T15:24:21Z
Indexed on
2010/03/23
15:33 UTC
Read the original article
Hit count: 231
c++
Hi,
I have a problem with template and wondering is there a possible way to achieve what I wanted to do. Here is my question.
template <typename T>
class A
{
public:
typedef T* pointer;
typedef const pointer const_pointer;
A()
{}
template <typename D>
A(const D& d)
{
// how can I store the D type
// so I can refer it later on
// outside of this function
}
};
© Stack Overflow or respective owner