Menu

template angle bracket misinterpreted as operator

Martin
2021-05-26
2021-05-27
  • Martin

    Martin - 2021-05-26

    Hi,

    for each of the following lines of code, I get the following FP: "(warning, inconclusive) Found suspicious operator '>'"

    std::vector< std::set< LabelHandle* > >::iterator vecIt;
    std::shared_ptr<boost::beast::http::request<boost::beast::http::vector_body<uint8_t> > > request = std::make_shared<boost::beast::http::request<boost::beast::http::vector_body<uint8_t> > >();
    std::vector<Value> result;
    std::shared_ptr<const IdMap_t> map(setupIdMap(ctx, false));
    

    Could you please check?

    Thanks,
    Martin

     
  • Daniel Marjamäki

    hmm.. I fail to reproduce:

    danielm@debian:~/cppcheck$ ./cppcheck --inconclusive --enable=style 2.cpp
    Checking 2.cpp ...
    danielm@debian:~/cppcheck$ cat 2.cpp
    std::vector< std::set< LabelHandle* > >::iterator vecIt;
    std::shared_ptr<boost::beast::http::request<boost::beast::http::vector_body<uint8_t> > > request = std::make_shared<boost::beast::http::request<boost::beast::http::vector_body<uint8_t> > >();
    std::vector<Value> result;
    std::shared_ptr<const IdMap_t> map(setupIdMap(ctx, false));
    

    am I missing some flag?

     
  • Martin

    Martin - 2021-05-26

    Mh you enabled "style", but it's a "warning"? I use --enable=all.

     
  • Martin

    Martin - 2021-05-26

    Ok I hoped I'd get away with just copying the lines of code, but it seems I'll have to prepare a test file. I'll upload it soon.

     
  • Martin

    Martin - 2021-05-26

    See attachment.

     
  • Daniel Marjamäki

    ok I can reproduce. Thanks! I have created ticket https://trac.cppcheck.net/ticket/10300

     

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.