Home | History | Annotate | Download | only in dcl.constexpr

Lines Matching full:template

39 template <typename T> constexpr class TC1 {}; // expected-error {{class cannot be marked constexpr}}
40 template <typename T> constexpr struct TS1 {}; // expected-error {{struct cannot be marked constexpr}}
41 template <typename T> constexpr union TU1 {}; // expected-error {{union cannot be marked constexpr}}
60 template<typename T> constexpr T f5(T);
61 template<typename T> constexpr T f5(T); // expected-note {{previous}}
62 template<typename T> T f5(T); // expected-error {{non-constexpr declaration of 'f5' follows constexpr declaration}}
63 template<typename T> T f6(T); // expected-note {{here}}
64 template<typename T> constexpr T f6(T); // expected-error {{constexpr declaration of 'f6' follows non-constexpr declaration}}
70 // template stuff
71 template <typename T> constexpr T ft(T t) { return t; }
72 template <typename T> T gt(T t) { return t; }
74 template<typename T> constexpr T f(); // expected-warning {{C++14}}
75 template <typename T>
76 T g() const; // expected-note-re {{candidate template ignored: could not match 'T (){{( __attribute__\(\(thiscall\)\))?}} const' against 'char (){{( __attribute__\(\(thiscall\)\))?}}'}}
80 template <> notlit ft(notlit nl) { return nl; }
81 template <> char ft(char c) { return c; } // expected-note {{previous}}
82 template <> constexpr char ft(char nl); // expected-error {{constexpr declaration of 'ft<char>' follows non-constexpr declaration}}
83 template <> constexpr int gt(int nl) { return nl; }
84 template <> notlit S::f() const { return notlit(); }
85 template <> constexpr int S::g() { return 0; } // expected-note {{previous}} expected-warning {{C++14}}
86 template <> int S::g() const; // expected-error {{non-constexpr declaration of 'g<int>' follows constexpr declaration}}
88 template <> char S::g() { return 0; } // expected-error {{no function template matches}}
89 template <> double S::g() const { return 0; } // ok