Error appear when using BOOST::fusion::map<....>
Error message:
In file included from axOrm/ormObject/ormObject.test.cpp:5: axOrm/ormObject/testObjects/objContactAndAddress.h: In member function 'void Atomix::Orm::Tests::CBaseOrmContact::SetName(XString)': axOrm/ormObject/testObjects/objContactAndAddress.h:92: error: no matching function for call to 'Atomix::Orm::Tests::CBaseOrmContact::GetPropertyHolder()'
Invalid source code
template <class TNameParam> typename fus::result_of::at_key< TmapAssociations,TNameParam>::type & GetAssociationHolder() { return fus::at_key<TNameParam>(m_mapAssociations); }
for fix simply change result_of::at_key to result_of::value_at_key
template <class TNameParam> typename fus::result_of::value_at_key<TmapAssociations,TNameParam>::type & GetAssociationHolder()
After fixing this error, you can achieved problem with const modifier. Correct syntax for const definition is:
template
{ return fus::at_key
Leave a Reply