[cfe-dev] Visual Studio 9 2008 compile error in ASTContext.cpp

Manjunath Kudlur keveman at gmail.com
Wed Jun 20 16:33:19 PDT 2012


I am getting the following error when compiling clang with Visual Studio 9
2008 (cmake -G "Visual Studio 9 2008"). My git checkout is at [commit
cea06d26b8f3a2599bba79f7e072b7550de949a7, git-svn-id:
https://llvm.org/svn/llvm-project/cfe/trunk@158869]. Any one else tried
seeing this error?

C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\xutility(315)
: error C2664: 'bool clang::BeforeThanCompare<clang::RawComment>::operator
()(const clang::RawComment &,const clang::SourceRange &)' : cannot convert
parameter 1 from 'const clang::SourceRange' to 'const clang::RawComment &'
        Reason: cannot convert from 'const clang::SourceRange' to 'const
clang::RawComment'
        No user-defined-conversion operator available that can perform this
conversion, or the operator cannot be called
        C:\Program Files (x86)\Microsoft Visual Studio
9.0\VC\include\algorithm(2298) : see reference to function template
instantiation 'bool std::_Debug_lt_pred<_Pr,T,_Ty>(_Pr,const _Ty1 &,const
_Ty2 &,const wchar_t *,unsigned int)' being compiled
        with
        [
            _Pr=clang::BeforeThanCompare<clang::RawComment>,
            T=clang::RawComment,
            _Ty=clang::SourceRange,
            _Ty1=clang::RawComment,
            _Ty2=clang::SourceRange
        ]
        C:\Program Files (x86)\Microsoft Visual Studio
9.0\VC\include\algorithm(2312) : see reference to function template
instantiation '_FwdIt std::_Lower_bound<const
clang::RawComment*,_Ty,std::iterator_traits<_Iter>::difference_type,_Pr>(_FwdIt,_FwdIt,const
_Ty &,_Pr,_Diff *)' being compiled
        with
        [
            _FwdIt=const clang::RawComment *,
            _Ty=clang::SourceRange,
            _Iter=const clang::RawComment *,
            _Pr=clang::BeforeThanCompare<clang::RawComment>,
            _Diff=std::iterator_traits<const clang::RawComment
*>::difference_type
        ]
        ..\..\..\..\..\tools\clang\lib\AST\ASTContext.cpp(85) : see
reference to function template instantiation '_FwdIt std::lower_bound<const
clang::RawComment*,clang::SourceRange,clang::BeforeThanCompare<clang::RawComment>>(_FwdIt,_FwdIt,const
_Ty &,_Pr)' being compiled
        with
        [
            _FwdIt=const clang::RawComment *,
            _Ty=clang::SourceRange,
            _Pr=clang::BeforeThanCompare<clang::RawComment>
        ]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20120620/0f59b1e2/attachment.html>


More information about the cfe-dev mailing list