|
-
November 14th, 2008, 05:25 PM
#1
How to check if template is a pointer?
I have a class that is wrapper to vector that just makes it easier to do common tasks as well as has other features. it uses templates so I can make various types. How can I determine if a type is a pointer or not? I want to make a function to free the memory of all the elements but I only want it to work on pointers as it would probably crash if I did it to a non pointer.
So say I got this:
template <class T>
How do I check if T is a pointer type?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|