note: declarations in dependent base ‘std::basic_ios’ are not found by unqualified lookup

错误信息如题所示。

修改前:

  template<
typename _CharT,
typename _Traits = std::char_traits<_CharT>
>
class BasicStkIos
: virtual public std::basic_ios<_CharT, _Traits>
{
public:
typedef basic_stkbuf <_CharT,_Traits> StkBufType; BasicStkIos()
: mBuf()
{init(&mBuf) ;}; BasicStkIos(const char* fName, std::ios::openmode m, const char* pFilter)
: mBuf(fName, m, pFilter)
{ init(&mBuf) ; } StkBufType*
rdbuf()
{ return &mBuf; } protected:
StkBufType mBuf;
};

修改后:

  template<
typename _CharT,
typename _Traits = std::char_traits<_CharT>
>
class BasicStkIos
: virtual public std::basic_ios<_CharT, _Traits>
{
public:
typedef basic_stkbuf <_CharT,_Traits> StkBufType; BasicStkIos()
: mBuf()
{this->init(&mBuf) ;}; BasicStkIos(const char* fName, std::ios::openmode m, const char* pFilter)
: mBuf(fName, m, pFilter)
{ init(&mBuf) ; } StkBufType*
rdbuf()
{ return &mBuf; } protected:
StkBufType mBuf;
};
上一篇:Linq技巧3——何时及怎么使用预先加载


下一篇:网站sqlserver提权操作