Skip to content

Instantly share code, notes, and snippets.

@pmor13
pmor13 / container.cpp
Last active August 29, 2015 14:18
Attempt to model generic container which can be used as type of packet field. Compatible with g++ 4.9.2 and VS10.
#include <cassert>
#include <iostream>
#include <cstring>
namespace ns_container {
// Container definition
typedef unsigned char element_type;
template <size_t N> struct container {
static const int capacity = N;