give names to anonymous enums

-Wlocal-type-template-args warns about use of values from anonymous
enums in expressions that involve templates. These warnings are
annoying, but they highlight a shortcoming of old C++.

refs #666

Signed-off-by: Matthias Kretz <kretz@kde.org>