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

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.68.2-1./webmlmd.H:52:12: error: elaborated type refers to a typedef Log
hugin 2013.0.0+dfsg-1cachedfileimage.hxx:558:22: error: elaborated type refers to a typedef Log
stx-btree 0.8.6-1WTreeDrawing.cpp:80:30: error: elaborated type refers to a typedef Log

3 errors