Dear all, Is it possible for boost function to store a polymorphic function like this.

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);
The AESEncryptionFactory and RSAEncryptionFactory are inherited from base class encryptionStrategyFactory but i encounter like conversion problem.

Is the polymorphic behaviour supports in Boost Function ?

Please help.

Thanks.