Skip to content

False positive: Add #include <algorithm> for sort #27

@rakhimov

Description

@rakhimov

Cpplint seems to assume that all standard algorithms come from the STL,
so, for example, if Boost algorithms are used,
the linter suggests to include <algorithm>.
Note that the function call is fully qualified as is required by the Google style:

#include <boost/range/algorithm.hpp>

void foo() {
  boost::sort(std::vector<int>{1, 2, 3, 4});
}

The solution strategy could be to take into account std:: qualification for function calls.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions