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
clang doesn't like the overloading here because libc++ implements std::string differently from stdlibc++ in such a way to trigger the bad overload error. I believe libc++ provides a conversion from std::string to std::vector<char> while stdlibc++ does not.
./Integer.hpp:120:5: error: constructor cannot be redeclared
IntegerTemplate(std::vector<char>::const_iterator begin, std::vector<char>::const_iterator end) : IntegerTemplate(end-begin, 0) {
^
./Integer.hpp:106:5: note: previous definition is here
IntegerTemplate(std::string::const_iterator begin, std::string::const_iterator end) : IntegerTemplate(end-begin, 0) {
^
diff --git a/Integer.hpp b/Integer.hpp
index ffe6af1..bdc2af8 100644
--- a/Integer.hpp+++ b/Integer.hpp@@ -117,13 +117,6 @@ public:
*this = *this + (std::find(bin2NT.begin(), bin2NT.end(), *i) - bin2NT.begin());
}
}
- IntegerTemplate(std::vector<char>::const_iterator begin, std::vector<char>::const_iterator end) : IntegerTemplate(end-begin, 0) {- for(auto i = begin; i != end; ++i) {- *this = (*this) << 2;- *this = *this + (std::find(bin2NT.begin(), bin2NT.end(), *i) - bin2NT.begin());- }- }-
/**Construct from a different size IntegerTemplate
Will clip (or add) extra nucs on the LEFT of the string
Note that c++17 has std::bytes which may be conceptually more appropriate.
The text was updated successfully, but these errors were encountered:
@jonchang@tseemann I discussed it with our c++ guru and he suggested that, although vector<char> and string are different types, their iterators might be implemented in clang as the same type (char* for example). I'm not convinced and still think it is a clang bug. Since the use of vector<char> constructor is very limited I (reluctantly) changed it to the string constructor and committed to the master. Inadvertently, some code which will be used in the next iteration had to be commited also. Please check if you can use it on macOS/clang.
c.f. brewsci/homebrew-bio#951
clang doesn't like the overloading here because libc++ implements
std::string
differently from stdlibc++ in such a way to trigger the bad overload error. I believe libc++ provides a conversion fromstd::string
tostd::vector<char>
while stdlibc++ does not.Note that c++17 has std::bytes which may be conceptually more appropriate.
The text was updated successfully, but these errors were encountered: