Use constexpr for constants.
Put flip() implementation in .cpp file.
Use C++11 'using' keyword for lcp typedef.