Skip to main content

looks_like_cpp

Function looks_like_cpp 

Source
pub fn looks_like_cpp(text: &str) -> bool
Expand description

Best-effort test: does this source text use C++-only constructs?

The .h extension is shared by C and C++ headers. When a .h file (detected as C by extension) contains any unambiguously C++ construct, callers should reclassify it as C++ so namespaces, classes, templates, and class-typed function signatures are counted correctly. Markers chosen to not appear in valid C: namespace, template, class, access specifiers, :: scope resolution, and std::.