http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29131
--- Comment #25 from Nikos Platis <nplatis at freemail dot gr> 2012-04-26 21:02:36 UTC --- The situation in the actual glm is more like the following. We also put t() and f() in namespace glm as well, se we get the following code, which produces the error: namespace glm { namespace detail { struct dvec3{}; } typedef detail::dvec3 vec3; } namespace glm { template<class T> int t(T i) { return f (i); } int f (glm::vec3 i) { return 0; } } int main() { glm::vec3 b; return glm::t(b); }