g++ error: extra qualification on member [-fpermissive]


以下這段代碼是在頭文件里面的,DmaOpen DmaClose函數也是直接在class pcie_chip{}里面的。加了個額外的pcie_chip::才會報錯。

 

//delete pcie_chip:: this scope identifier to solve g++ error:http://stackoverflow.com/questions/5642367/extra-qualification-error-in-c
        //this usage does not accord to C++ standard , and fuck the MSVC surpport this feature
         
    void /*pcie_chip::*/DmaOpen(  bool fPolling ,  
                            unsigned long  dwOptions ,
                            unsigned char *pdata  ,
                            int64 size ) ;
 
    void  /*pcie_chip::*/DmaClose(  ) ;

 

 

就是上述那樣,需要把pcie_chip::注釋掉。   MSVC支持的C++太特么不標准了,所以很多程序員養成了惡習。

 

reference:

http://stackoverflow.com/questions/5642367/extra-qualification-error-in-c


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM