I have the following code in Eclipse CDT (Juno SR1):
#include <fstream>
#include <iostream>
#include <boost/iostreams/filter/gzip.hpp>
#include <boost/iostreams/filtering_streambuf.hpp>
#include <boost/iostreams/copy.hpp>
int main()
{
using namespace std;
namespace io = boost::iostreams;
ifstream file("data.gz", ios_base::in | ios_base::binary);
io::filtering_streambuf<io::input> in;
in.push(io::gzip_decompressor()); // error here
in.push(file); // and here
}
g++ 4.7.2
has no problem with the code. Eclipse, however, complains about the two in.push()
lines. The error message is the same in both cases:
Invalid arguments '
Candidates are:
void push(std::basic_streambuf<#10000,#10001> &, ?, ?)
void push(std::basic_istream<#10000,#10001> &, ?, ?)
void push(std::basic_ostream<#10000,#10001> &, ?, ?)
void push(std::basic_iostream<#10000,#10001> &, ?, ?)
void push(const boost::iterator_range<#10000> &, ?, ?)
void push(const boost::iostreams::pipeline<#10000,#10001> &)
void push(const #10000 &, ?, ?, boost::disable_if<boost::iostreams::is_std_io<#10000>,void>::type *)
'
How do I fix or work around this to stop CDT complaining?