P
pallav
vector<TLExpression*> forms;
map<const TLExpression*, bool> stateTable;
for (ExprMap::iterator itr = stateTable.begin(); itr !=
stateTable.end(); ++itr)
forms.push_back(const_cast<TLExpression *>(itr->first));
i'm trying to use the stl::transform to convert the above code. i have
std::transform(stateTable.begin(0, stateTable.end(),
std::back_inserter(forms),
boost::bind(&ExprMap::value_type::first, _1));
however, i get compiler errors with this saying i'm trying to convert
const TLExpresion* to TLExpression*. i'm not sure where/how to cast
in std::transform. where/what/how should i cast?
thanks for your time/help.
map<const TLExpression*, bool> stateTable;
for (ExprMap::iterator itr = stateTable.begin(); itr !=
stateTable.end(); ++itr)
forms.push_back(const_cast<TLExpression *>(itr->first));
i'm trying to use the stl::transform to convert the above code. i have
std::transform(stateTable.begin(0, stateTable.end(),
std::back_inserter(forms),
boost::bind(&ExprMap::value_type::first, _1));
however, i get compiler errors with this saying i'm trying to convert
const TLExpresion* to TLExpression*. i'm not sure where/how to cast
in std::transform. where/what/how should i cast?
thanks for your time/help.