Dear all, Is it possible for boost function to store a polymorphic function like this.
The AESEncryptionFactory and RSAEncryptionFactory are inherited from base class encryptionStrategyFactory but i encounter like conversion problem.Code:typedef boost::function<encryptionStrategy* (encryptionStrategyFactory* ) > factoryFn; std::vector<factoryFn> factoryCont; factoryCont.push_back(&encryptionStrategyFactory::createEncryptor); factoryCont.push_back(&AESEncryptionFactory::createEncryptor); factoryCont.push_back(&RSAEncryptionFactory::createEncryptor);
Is the polymorphic behaviour supports in Boost Function ?
Please help.
Thanks.




Reply With Quote