Menu

'decltype' not understood any more by latest cppcheck

Martin
2020-10-27
2020-10-27
  • Martin

    Martin - 2020-10-27

    Hi,

    analyzing our codebase with 1f6cb7a54be5de2d4e043eef3b052977d4e91ad0 from master branch leads to this new "finding":

    void tokenize_modarg() {
    auto it_beg = pa_modargs_get_value();
    auto it_end = it_beg + strnlen(it_beg, 1024);
    auto next_token = -> decltype(it_beg) {
    return std::find_if(first, last, -> bool{
    return c == ',';
    });
    };
    }

    ex1.cpp:4:25: error: There is an unknown macro here somewhere. Configuration is required. If decltype is a macro then please configure it. [unknownMacro]
    auto next_token = -> decltype(it_beg) {

    This does not happen with d7a8e25d927151986e7a69e0085316754179f2d6 .

    Could you please check?

    Best regards,
    Martin

     
  • Daniel Marjamäki

    Thanks! Ooops my fault. I will fix this.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.