--- title: "packet" --- A homogeneous container that can contain one of several types that are all inherited from the same base class. ```cpp etl::packet ``` ## Template parameters `TBase`  The base class for all objects. The destructor must be virtual. `SIZE`  The size of the largest type. `ALIGNMENT`  The largest alignment of all of the types. ## Member types `base_t` = `TBase` ## Contructors **C++03** ```cpp template explicit packet(const T& value) ``` **C++11** ```cpp template explicit packet(T&& value) ``` **Description** Constructs an object of type `T` with the supplied value. Static asserts on any type that does not derive from `TBase`. Static asserts on any type that does not conform to the maximum size and alignment. ## Destructor ```cpp ~packet() ``` **Description** Destructs the contained object ## Operators **C++03** ```cpp template packet& operator =(const T& value) ``` **C++11** ```cpp template packet& operator =(T&& value) ``` **Description** Assigns a new object to the packet. The previous object is destructed. ## Access ```cpp const TBase& get() const ``` **Description** Returns a const reference to the contained object.