http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57403
--- Comment #3 from Marc Glisse <glisse at gcc dot gnu.org> --- (In reply to Nick Maclaren from comment #2) > That may well be true, but I can't find any such restriction in the C++ > standard. It would be a great help if the library specification weren't > so ambiguous - in this case, it hinges around the meaning of the word > 'type', and the unqualified word is used with at least three meanings > in the standard. C++03 gives the prototype of the constructor: explicit vector(size_type n, const T& value = T(), const Allocator& = Allocator()); which shows that it can't work: typedef volatile int T; void f () { T const& a = T(); } For C++11, the prototype changed, it gets harder to follow...