P4C
The P4 Compiler
Loading...
Searching...
No Matches
P4::RTTI::has_rtti< T > Struct Template Reference

#include <rtti_utils.h>

Inheritance diagram for P4::RTTI::has_rtti< T >:
[legend]

Detailed Description

template<typename T>
struct P4::RTTI::has_rtti< T >

A trait that check T is custom-RTTI-enabled. Works just like standard property type traits. One would normally use the _v variant. NOTE: Custom-RTTI-enabled classes should not only derive from RTTI::Base, but should also declare typeId properly. However, not doing so would be a bug and use of such class in RTTI-related operations would lead to static_assert failuire in RTTI::TypeInfo, so we just check the base.