When compile following code with clang (Debug build), Assertion will be triggered.
struct A
{
struct Nested {};
operator Nested*() {return 0;};
};
struct B : A
{
using A::operator typename A::Nested*;
operator typename A::Nested *() {
struct A * thi = this;
return *thi;
};
};The assertion fail is caused by: void erase(unsigned I) { Decls[I] = Decls.pop_back_val(); } when size of Decls is 1 before erase.
Thanks for review my patch
Zhouyi Zhou
zhouzhouyi@gmail.com
if (I == Decls.size() - 1)