You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 27, 2021. It is now read-only.
See: <https://bugs.gentoo.org/show_bug.cgi?id=454104> and <
https://tinderboxlogs.s3.amazonaws.com/tbamd64.excelsior.flameeyes.eu/sci-libs%3
Avotca-tools-1.2.3%3A20130126-015723.html>
I could reproduce the problem only in combination with gcc-4.7. I guess it
boils down to:
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/include/g++-v4/bits/stl_algo.h:4940:5:
note: template argument deduction/substitution failed:
include/votca/tools/tokenizer.h:96:9: note: could not resolve address from
overloaded function 'lexical_cast<int, std::string>'
Original issue reported on code.google.com by christop...@gmail.com on 26 Jan 2013 at 10:57
The text was updated successfully, but these errors were encountered:
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
Original issue reported on code.google.com by
christop...@gmail.com
on 26 Jan 2013 at 10:57The text was updated successfully, but these errors were encountered: