重新编译make错误的问题,各位牛人怎么弄?
/usr/include/c++/4.8.3/bits/streambuf_iterator.h:172:43: 错误:宏“equal”需要 3 个参数,但只给出了 1 个equal(const istreambuf_iterator& __b) const ^
/usr/include/c++/4.8.3/bits/streambuf_iterator.h:206:27: 错误:宏“equal”需要 3 个参数,但只给出了 1 个
{ return __a.equal(__b); } ^
/usr/include/c++/4.8.3/bits/streambuf_iterator.h:212:28: 错误:宏“equal”需要 3 个参数,但只给出了 1 个
{ return !__a.equal(__b); }
/usr/include/c++/4.8.3/bits/streambuf_iterator.h:172:7: 错误:expected ‘;’ at end of member declaration
equal(const istreambuf_iterator& __b) const ^
/usr/include/c++/4.8.3/bits/streambuf_iterator.h:173:7: 错误:expected unqualified-id before ‘{’ token
{ return _M_at_eof() == __b._M_at_eof(); }
streambuf_iterator.h文件相关内容为:
bool
equal(const istreambuf_iterator& __b) const
{ return _M_at_eof() == __b._M_at_eof(); }
private:
int_type
_M_get() const
{
const int_type __eof = traits_type::eof();
int_type __ret = __eof;
if (_M_sbuf)
{
if (!traits_type::eq_int_type(_M_c, __eof))
__ret = _M_c;
else if (!traits_type::eq_int_type((__ret = _M_sbuf->sgetc()),
__eof))
_M_c = __ret;
else
_M_sbuf = 0;
}
return __ret;
}
bool
_M_at_eof() const
{
const int_type __eof = traits_type::eof();
return traits_type::eq_int_type(_M_get(), __eof);
}
};
template<typename _CharT, typename _Traits>
inline bool
operator==(const istreambuf_iterator<_CharT, _Traits>& __a,
const istreambuf_iterator<_CharT, _Traits>& __b)
{ return __a.equal(__b); }
template<typename _CharT, typename _Traits>
inline bool
operator!=(const istreambuf_iterator<_CharT, _Traits>& __a,
const istreambuf_iterator<_CharT, _Traits>& __b)
{ return !__a.equal(__b); }
constants.h:266:22: 错误:expected unqualified-id before ‘(’ token
#define min(x,y) ( ((x) < (y)) ? (x) : (y) )
constants.h文件相关内容为:
#ifndef MACROS
#define MACROS
#define equal(a,b,n) ( strncmp(a,b,(size_t)(n)) == (int)0 )
#define max(x,y) ( ((x) > (y)) ? (x) : (y) )
#define min(x,y) ( ((x) < (y)) ? (x) : (y) )
#define clamp(x,lowerbound) ( ((x) < (lowerbound)) ? (lowerbound) : (x) )
怎么解决,各位牛人,谢谢?更多0
页:
[1]