P4C
The P4 Compiler
Loading...
Searching...
No Matches
P4::BitRange::FromTo Struct Reference

#include <bitrange.h>

Public Member Functions

 FromTo (const FromTo &)=delete
 
 FromTo (int from, int to)
 
FromTooperator= (const FromTo &)=delete
 

Public Attributes

const int from
 
const int to
 

Detailed Description

A helper type used to construct a range, specified as the closed interval between two bit indices. For example, FromTo(6, 8) denotes a range containing three bits: bit 6, bit 7, and bit 8.

FromTo is only intended to be used as a constructor parameter, to allow creation of ranges in a more readable manner; use it to construct a HalfOpenRange or ClosedRange.