码迷,mamicode.com
首页 > 移动开发 > 详细

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

时间:2015-09-29 12:57:09      阅读:246      评论:0      收藏:0      [点我收藏+]

标签:

错误信息如题所示。

修改前:

 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     };

 

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

标签:

原文地址:http://www.cnblogs.com/tibetanmastiff/p/4845867.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!