Skip to content

Instantly share code, notes, and snippets.

@sinya8282
Created June 1, 2011 09:51
Show Gist options
  • Save sinya8282/1002055 to your computer and use it in GitHub Desktop.
Save sinya8282/1002055 to your computer and use it in GitHub Desktop.
struct Transition {
int t[256];
Transition(int fill = REJECT) { std::fill(t, t+256, fill); }
int &operator[](std::size_t index) { return t[index]; }
const int &operator[](std::size_t index) const { t[index]; } // <- forget 'return' stmt.
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment