mercredi 3 juillet 2019

C++ boost::bimap insert() method not working

I am trying to insert data in boost::bimap but gives a error.

'''typedef boost::bimap<std::string, std::string> bimap_type;
bimap_type _obs_ids;
// name and obs_id are std::string type data
_obs_ids.insert(bimap_type::value_type(name, obs_id));
'''

Error::

no instance of overloaded function "boost:thimaps::bimap::insert [with KeyTypeA= std::string, KeyTypelhstd::string, AP1=boost::mpl::na, AP2= boost::mpl::na, AP3= boost:mph:na]" matches the argument list and object (the object has type qualifiers that prevent a match) argument types are: (boostthimapsuelation::mutant_relation, boost::bimaps::tags::tagged, boost::mpl::na, false>) object type is: const ipm::config::bimap_type

Aucun commentaire:

Enregistrer un commentaire