gcc 4.5 in c++0x mode rejects the following valid code: std::vector<int> vec;
decltype(vec)::value_type v = vec.first(); Per the DR above, decltype can be used with the :: operator. This is similar to a bug report that someone posted for version 3.1, but my experience is with 4.5. -- Summary: [DR743] decltype cannot be used with the :: operator Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: faisalv at yahoo dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43780