An unscoped enumeration used as template argument, should not
have any qualified information about its enclosing scope, as
its visibility is global.
In the case of scoped enumerations, they must include information
about their enclosing scope.
For the below test:
enum unscoped { a }; enum class scoped { b }; template<unscoped U> struct tmpl_u { }; template<scoped S> struct tmpl_s { }; tmpl_u<unscoped::a> tmpl_unscoped; tmpl_s<scoped::b> tmpl_scoped;
gives the following encoded names:
DW_TAG_structure_type "tmpl_u<unscoped::a>" DW_TAG_structure_type "tmpl_s<scoped::b>"
The incorrectly qualified name causes a debugger to show qualified
names for both scoped and unscoped enumerations.