How about traits, in an STL fashion? For instance:
enum Foo
{
Bar,
Baz
};
write an
std::numeric_limits<enum Foo>::max()
specialization (possibly constexpr if you use c++11). Then, in your test code provide any static assertions to maintain the constraints that std::numeric_limits::max() = last_item.