"Elaborated type refers to a typedef" build failure(s) — clang 3.4.2

The following code is rejected by clang while accepted by g++
#include <string>


template<typename T> T foo(T s)
{
    class T::iterator b=s.begin(), e=s.end(), p=b;
}

void foo(char *a)
{
    foo<std::string>(a);
}
PackageVersionSupposed error messageFull log Bug report
courier 0.73.1-1.1./webmlmd.H:52:12: error: elaborated type refers to a typedef Log

1 errors