[LLVMbugs] [Bug 12195] New: Clang++ requires this-> access of member function in templated class

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Mar 6 06:06:51 PST 2012


http://llvm.org/bugs/show_bug.cgi?id=12195

             Bug #: 12195
           Summary: Clang++ requires this-> access of member function in
                    templated class
           Product: clang
           Version: unspecified
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: barry at physionconsulting.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified


The Crypto++ 5.6.1 code base (http://www.cryptopp.com/cryptopp561.zip) fails to
compile under Xcode 4.3/Clang 4.3. Several "Use of undeclared identifier'
errors prevent compilation. These errors such as the following in algebra.cpp


Use of undeclared identifier 'Equal'

        while (!Equal(g[i1], this->Identity()))


                ^


                this->


In instantiation of member function
'CryptoPP::AbstractEuclideanDomain<CryptoPP::Integer>::Gcd' requested here

CRYPTOPP_DLL_TEMPLATE_CLASS AbstractEuclideanDomain<Integer>;


                            ^


Must qualify identifier to find this declaration in dependent base class

        virtual bool Equal(const Element &a, const Element &b) const =0;


                     ^



are resolved by adding this-> to the missing symbol. In other words, all
"missing" symbols are member functions of templated classes. Qualifying the
symbol with this-> allows compilation to proceed without error.

Crypto++ source attached.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list