The code is trying to implement the visitor pattern in a better way: trying to match correct visitor before downcast. for example, I hope it calls VisitorB::visit() at last from the main() function.
The error shows it can't decide the version of member function accept() since VisiteeB got two parents:
class VisiteeB : public Visitee<VisiteeB>, public VisiteeA
{
public:
using Visitee<VisiteeB>::accept;
using VisiteeA::accept;
};
But I think Visitee<VisiteeB>::accept() is the obvious choice for it's the best match.