Skip to main content

cpp_range_is_pure_virtual_declaration

Function cpp_range_is_pure_virtual_declaration 

Source
pub fn cpp_range_is_pure_virtual_declaration(
    root: Node<'_>,
    source: &str,
    range: &Range,
) -> bool
Expand description

Whether the occurrence at range is a pure-virtual member declaration (virtual T f() = 0;).

A pure virtual is the C++ spelling of an abstract method: = 0 says the declaration has no body, so the declaration is itself the definition site. Definition navigation answers with it the way the JVM adapters answer an interface method with its declaration, instead of reporting that the candidates hold no implementation body (#2178). A pure virtual may still carry an out-of-line body; that occurrence is a real definition and is selected on its own role.