Date
2011-02-22.00:00:00
Message id
3262

Content

Type matching rules aren't well-specified in the current Standard, but it seems reasonable to say that if a declaration uses decltype, its definition must do so as well. For example, the following should be ill-formed:

    template<class T, T* u> struct S {
      decltype(u) foo(T);
    };

    template<class T, T *u> T* S<T, u>::foo(T) {
       return nullptr;
    }