Closed GoogleCodeExporter closed 8 years ago
I think the problem is that boost introduced a version of lexical_cast for
whole arrays and therefore boost::lexical_cast<T, std::string> is ambigious?
The following patch resolves the compilation issue but I didn't test yet if it
breaks anything else. However it would be nice to find a way to still use
std::transform / anything more elegant which is backward compatible.
--- a/include/votca/tools/tokenizer.h Sun Dec 02 21:10:09 2012 -0700
+++ b/include/votca/tools/tokenizer.h Sun Jan 27 03:09:10 2013 +0000
@@ -93,8 +93,10 @@
std::vector<std::string> tmp;
ToVector(tmp);
v.resize(tmp.size());
- transform(tmp.begin(), tmp.end(), v.begin(),
- boost::lexical_cast<T, std::string>);
+ typename std::vector<T>::iterator viter = v.begin();
+ typename std::vector<std::string>::iterator iter;
+ for(iter = tmp.begin(); iter!=tmp.end(); ++iter, ++viter)
+ *viter = boost::lexical_cast<T, std::string>(*iter);
}
private:
Original comment by victor.r...@gmail.com
on 27 Jan 2013 at 3:17
This issue was closed by revision f26d7ee778d6.
Original comment by rue...@votca.org
on 27 Jan 2013 at 3:56
Original issue reported on code.google.com by
christop...@gmail.com
on 26 Jan 2013 at 10:57