E
Ed
Hi, guys,
A big rock blocks my way.
I know that to put a user defined class with copy constructor,
override operator method, etc, can not be placed into Union. But I
have to.
I am refactoring an old system with template feature. If there is no
way, that means I had to pay additional work to re-implementation.
I am wondering if there is some tricks to fix it?
Say, I have a simple template class:
template<typename P>
class Vector1
{
public:
P mValue;
public:
Vector1 (P);
Vector1 (const Vector1 vec_);
}
template<typename P>
class Vector3
{
public:
union
{
Vector1<P> p1;
Vector1<P> p2;
Vector1<P> p3;
}
}
Thanks!
A big rock blocks my way.
I know that to put a user defined class with copy constructor,
override operator method, etc, can not be placed into Union. But I
have to.
I am refactoring an old system with template feature. If there is no
way, that means I had to pay additional work to re-implementation.
I am wondering if there is some tricks to fix it?
Say, I have a simple template class:
template<typename P>
class Vector1
{
public:
P mValue;
public:
Vector1 (P);
Vector1 (const Vector1 vec_);
}
template<typename P>
class Vector3
{
public:
union
{
Vector1<P> p1;
Vector1<P> p2;
Vector1<P> p3;
}
}
Thanks!