Skip to content

cpplint incorrectly labels C++17 headers as C headers #309

@jacobperron

Description

@jacobperron

Consider this example:

// Copyright 2021 Jacob Perron
#include <iostream>
#include <optional>

int main(void)
{
  return 0;
}

IIUC, following the Google C++ guide, it has the correct, alphabetically sorted, list of included C++ headers.

However, ament_cpplint complains that <optional> is a C header and should appear before <iostream>.

I've noticed that the same issue happens for all C++17 headers, e.g. <filesystem>. cpplint doesn't seem to be aware of them. Perhaps there is a patch upstream to fix this, but I haven't taken a look.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions