Compile error with boost::factory after upgrade to 1.58.0
Hi,
I installed Boost 1.58.0 today, having been using 1.57.0 previously, and noticed that a part of my code that uses boost::factory doesn't compile anymore. Here's briefly what I'm doing, followed by the error message I'm getting:
typedef boost::functionApollo::ReportGenerator*(Apollo::ApolloBaseModel*) reportFactory;
struct reportListing {
std::string displayName;
reportFactory factory;
reportListing(std::string name, reportFactory f) : displayName(name), factory(f) { }
};
std::vector<reportListing> reportFactories;
reportFactories.push_back(reportListing("Scenario Analyzer", boost::factoryApollo::ScenarioAnalyzer*())); // Apollo::ReportGenerator being the base class from which Apollo::ScenarioAnalyzer is derived
...
The constructor for ScenarioAnalyzer is:
ScenarioAnalyzer(Apollo::ApolloBaseModel* model)
This fails to compile with the following error (on Windows 7 using Visual C++ 12):
error C2664: 'Apollo::ScenarioAnalyzer *boost::factory
participants (1)
-
Bitar Fadi