[cfe-dev] template issue with clang::RedeclarableTemplateDecl::SpecIterator

Laszlo Nagy rizsotto.mailinglist at gmail.com
Wed Feb 20 15:25:05 PST 2013


Hi,

run into a weird error message when tried to compile a project...

tools/clang/include/clang/AST/DeclTemplate.h:560:22: error:
      no matching constructor for initialization of 'SetIteratorType' (aka
      'FoldingSetVectorIterator<clang::FunctionTemplateSpecializationInfo,
      typename SmallVector<FunctionTemplateSpecializationInfo *,
8>::iterator>')
    SpecIterator() : SetIter() {}
                     ^
Actually the user of the code is wrong to default construct for the
iterator. But I think it would be more elegant to not declare default
construtor, if the parent class does not have it. Namely the
llvm::FoldingSetVectorIterator class does not have, therefore
the clang::RedeclarableTemplateDecl::SpecIterator should not have either.

What do you think?

Regards,
Laszlo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130221/85ec22cf/attachment.html>


More information about the cfe-dev mailing list