You need to put the specialization in the correct place:
template <typename A> class Example<A,2>
If you want to create a subclass:
template <typename A> class ExampleSpecialization : public Example<A,2>
The behavior for specializing on typedefs is similar to the behavior for specializing on an integer parameter.