C++17 §
10.1.7.2/1 defines the /type-name/ after `~` as one of
class-name
enum-name
typedef-name
simple-template-id
This suggests that no matter how /simple-template-id/ turns out a fix
can be to use a /typedef-name/.
§17.2/1 defines /simple-template-id/ as (transcribed to typewriter-ish)
template-name `<` template-argument-list OPTIONAL `>`
The question is then whether your template alias `B` is a
/template-name/. The very same paragraph defines /template-name/
syntactically as
identifier
It then explains (in a non-normative note plus in normative text in
paragraph 3) that it's the name lookup that determines if a name is a
/template-name/. I fail to find that. However, §17.5.7 states that
An alias template is a name for a family of types. The name of the
alias template is a /template-name/.
So this is a bug in dang.
Workaround probably as mentioned above.
- Alf