You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
virtual a* unqualified_vs_const_volatile_class(); // expected-note{{overridden virtual function is here}}
104
104
105
-
//Check non class.
105
+
//Non Classes.
106
106
virtualconstint* const_vs_unqualified_non_class(); // expected-note{{overridden virtual function is here}}
107
107
virtualint* unqualified_vs_const_non_class(); // expected-note{{overridden virtual function is here}}
108
108
};
109
109
110
110
classB : A {
111
-
//Check cv-qualification.
111
+
//Classes.
112
112
a* const_vs_unqualified_class() override;
113
113
const a* unqualified_vs_const_class() override; // expected-error{{return type of virtual function 'unqualified_vs_const_class' is not covariant with the return type of the function it overrides (class type 'const a *' does not have the same cv-qualification as or less cv-qualification than class type 'a *')}}
114
114
@@ -127,7 +127,7 @@ class B : A {
127
127
a* const_volatile_vs_unualified_class() override;
128
128
constvolatile a* unqualified_vs_const_volatile_class() override; // expected-error{{return type of virtual function 'unqualified_vs_const_volatile_class' is not covariant with the return type of the function it overrides (class type 'const volatile a *' does not have the same cv-qualification as or less cv-qualification than class type 'a *')}}
129
129
130
-
//Check non class.
130
+
//Non Classes.
131
131
int* const_vs_unqualified_non_class() override; // expected-error{{virtual function 'const_vs_unqualified_non_class' has a different return type ('int *') than the function it overrides (which has return type 'const int *')}}
132
132
constint* unqualified_vs_const_non_class() override; // expected-error{{virtual function 'unqualified_vs_const_non_class' has a different return type ('const int *') than the function it overrides (which has return type 'int *')}}
0 commit comments