zoukankan      html  css  js  c++  java
  • note: declarations in dependent base ‘std::basic_ios<char>’ are not found by unqualified lookup

    错误信息如题所示。

    修改前:

     1  template<
     2     typename _CharT,
     3     typename _Traits = std::char_traits<_CharT>
     4   >
     5     class BasicStkIos
     6     : virtual public std::basic_ios<_CharT, _Traits>
     7     {
     8     public:
     9       typedef basic_stkbuf <_CharT,_Traits>        StkBufType;
    10 
    11       BasicStkIos()
    12       : mBuf()
    13       {init(&mBuf) ;};
    14 
    15       BasicStkIos(const char* fName, std::ios::openmode m, const char* pFilter)
    16       : mBuf(fName, m, pFilter)
    17       { init(&mBuf) ; }
    18 
    19       StkBufType*
    20       rdbuf()
    21       { return &mBuf; }
    22 
    23     protected:
    24       StkBufType  mBuf;
    25     };

    修改后:

     1  template<
     2     typename _CharT,
     3     typename _Traits = std::char_traits<_CharT>
     4   >
     5     class BasicStkIos
     6     : virtual public std::basic_ios<_CharT, _Traits>
     7     {
     8     public:
     9       typedef basic_stkbuf <_CharT,_Traits>        StkBufType;
    10 
    11       BasicStkIos()
    12       : mBuf()
    13       {this->init(&mBuf) ;};
    14 
    15       BasicStkIos(const char* fName, std::ios::openmode m, const char* pFilter)
    16       : mBuf(fName, m, pFilter)
    17       { init(&mBuf) ; }
    18 
    19       StkBufType*
    20       rdbuf()
    21       { return &mBuf; }
    22 
    23     protected:
    24       StkBufType  mBuf;
    25     };
  • 相关阅读:
    HTML5元素标记释义
    Mvc使用Partial View 来封装上传控件
    订单页过滤,sql写法
    防止提交重复订单的方法
    查询数据库所有列
    asp.net 异常处理
    7. DateTime,TimeSpan
    8.1.thread
    8.2.Task
    2.2. Array
  • 原文地址:https://www.cnblogs.com/tibetanmastiff/p/4845867.html
Copyright © 2011-2022 走看看