FE 0.13.1
Header-only C++ frontend library
Loading...
Searching...
No Matches
fe::NodeSetable Concept Reference

Like Nodeable, but for a class that spans a set of node kinds instead of a single one. More...

#include <fe/cast.h>

Concept definition

template<class T>
concept NodeSetable = requires(T n) {
{ T::isa_node(n.node()) } -> std::convertible_to<bool>;
}
Like Nodeable, but for a class that spans a set of node kinds instead of a single one.
Definition cast.h:23

Detailed Description

Like Nodeable, but for a class that spans a set of node kinds instead of a single one.

Such a class declares static constexpr bool isa_node(<node type>) to decide membership. This keeps RuntimeCast::isa from falling back to a dynamic_cast for abstract bases that merely group nodes.

Definition at line 23 of file cast.h.