extern "C" { void bcopy(const void *, void *, int); } class TestNodeKey; class TestNodeValue; template class NodePart { public: NodePart(void); NodePart(const NodePart& Src); }; template inline NodePart::NodePart(void) { } template inline NodePart::NodePart(const NodePart& Src) { ::bcopy(&Src, this, sizeof(T)); } class TestNodeKey : public NodePart { public: char C __attribute__ ((packed)); }; class TestNodeValue : public NodePart { public: long L __attribute__ ((packed)); }; template class Node { public: K Key __attribute__ ((packed)); V Value __attribute__ ((packed)); Node(void); Node(const Node& Src); }; template inline Node::Node(void) { } template inline Node::Node(const Node& Src) { this->Key = Src.Key; this->Value = Src.Value; } class TestNode : public Node { public: }; int main (int ArgC, char* ArgV[]) { TestNode TN1; TestNode TN2 = TN1; // TestNode TN2; // TN2 = TN1; return 0; }