示例#1
0
 PolymorphicWrapper(const PolymorphicWrapper& other)
 {
     mCopyFunction = other.mCopyFunction;
     mValue = mCopyFunction(other.mValue); //uses stored lambda to copy
 }
示例#2
0
 PolymorphicWrapper& operator=(const PolymorphicWrapper& other)
 {
     mCopyFunction = other.mCopyFunction;
     mValue = mCopyFunction(other.mValue); //uses stored lambda to copy
     return *this;
 }
示例#3
0
 CopyablePolymorphic(const CopyablePolymorphic& other)
 {
     mCopyFunction = other.mCopyFunction;
     mValue = mCopyFunction(other.mValue); //uses stored lambda to copy
 }