Skip to content

Commit 62c3dd5

Browse files
committed
Don't take address of std::string::method
I'm still investigating whether this is legal, but in fact this doesn't build with clang/libc++: https://llvm.org/bugs/show_bug.cgi?id=24127
1 parent 7e295be commit 62c3dd5

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/model/Sequence.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -378,10 +378,12 @@ static void read_fasta(Sequence& seq, std::istream& input, const F& f) {
378378
reader.read_one_sequence();
379379
}
380380

381+
static void string_append(std::string& target, const std::string& source) {
382+
target.append(source);
383+
}
384+
381385
void InMemorySequence::read_from_file(std::istream& input) {
382-
typedef std::string& (std::string::* StringMethod)(const std::string&);
383-
StringMethod append = &std::string::append;
384-
read_fasta(*this, input, boost::bind(append, &data_, _1));
386+
read_fasta(*this, input, boost::bind(&string_append, boost::ref(data_), _1));
385387
set_size(data_.size());
386388
}
387389

0 commit comments

Comments
 (0)