// report.hpp
#pragma once
#include <string>
#include <vector>
using namespace std;
string render(const vector<string>& lines);Deterministic line match: flags lines that start with `using namespace std;` in `.h`, `.hh`, `.hpp`, and `.hxx` files.
`using namespace std;` in a header file. Every file that includes the header inherits the whole `std` namespace and the name clashes that come with it.
Each example shows the exact code shape the rule is looking for, then the smallest version that keeps the intent without hiding risk or adding noise.
// report.hpp
#pragma once
#include <string>
#include <vector>
using namespace std;
string render(const vector<string>& lines);Deterministic line match: flags lines that start with `using namespace std;` in `.h`, `.hh`, `.hpp`, and `.hxx` files.
// report.hpp
#pragma once
#include <string>
#include <vector>
std::string render(const std::vector<std::string>& lines);Qualify names with `std::` in headers. If you want the directive, put it in a `.cpp` file or inside a function.
Agents add the directive to save typing `std::`, without distinguishing a header from an implementation file.
ai-slop/cpp-using-namespace-std-in-header
ai-slop
Deterministic line match: flags lines that start with `using namespace std;` in `.h`, `.hh`, `.hpp`, and `.hxx` files.
The directive in `.cpp`/`.cc` implementation files, and narrow using-declarations such as `using std::string;`, are not flagged.
Part of aislop's C/C++ rule set. C/C++ support, including C/C++-specific AI-slop rules, arrived in aislop v0.14.1.