[cfe-dev] Current list of issues with parsing <vector> on Linux

Eli Friedman eli.friedman at gmail.com
Wed Jul 22 11:33:07 PDT 2009


I just went through <vector> on Linux to try and compile a current
list of issues.  The list follows.  A few of these look like they
should be easy to fix, and none of them look particularly difficult.
It's possible there are a few other issues hidden by these issues, but
I think this is the majority of the issues.

-Eli

Templated constructors:
struct A { template <class B> A(B); };

PR4381 (templated class inheriting from member of templated class):
template<class T> struct X {};
template<typename T> struct Y : public X<T>::X { };

Out-of-line definition of function template member of template class:
template <bool A> class X { template <class B> bool x(B z); };
template <bool A> template <class B> bool X<A>::x(B z) { return A == z; }

extern template:
template <class A> class X {};
extern template class X<char>;

__is_empty:
class A{};
int a() { return __is_empty(A); }

Explicit destructor call:
class A {};
void test(A* x) { x->~A(); }

"using" with dependent type:
template <class A> class X : A { using A::x; };

Explicit call to conversion operator:
struct s {operator bool() const { return false; } };
bool a(s x) { return bool(x); }

Inherited operator:
struct A { bool operator!=(A&); };
struct B : A {};
bool x(B y, B z) { return y != z; }



More information about the cfe-dev mailing list