http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50545
Jason Merrill <jason at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |SUSPENDED Last reconfirmed| |2011-10-13 CC| |jason at gcc dot gnu.org Ever Confirmed|0 |1 --- Comment #1 from Jason Merrill <jason at gcc dot gnu.org> 2011-10-13 22:02:12 UTC --- int{ declval<T>() } is an example of an "instantiation-dependent" expression that is neither type-dependent (its type is int) nor value-dependent (because it's not a constant-expression), so G++ just resolves its decltype to int. This isn't what we want, but what exactly we do want is an open issue: http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#1172