|
-
September 23rd, 2012, 11:28 AM
#2
Re: class template Convert which can convert itself to any data type
 Originally Posted by loves_oi
Code:
template<class T>
operator T() const
{
return data;
}
This doesn't make sense. The cast operator can only be defined as a class member function.
What are you trying to achieve at a higher level?
Cheers, D Drmmr
Please put [code][/code] tags around your code to preserve indentation and make it more readable.
As long as man ascribes to himself what is merely a posibility, he will not work for the attainment of it. - P. D. Ouspensky
Tags for this Thread
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
|