// We must define non-defaulted move operations as in the real RefPtr to make // the type non-trivially-copyable.
RefPtr(RefPtr<T>&&);
RefPtr& operator=(RefPtr<T>&&);
nsCOMPtr<Type> kfdg_m1(p); // expected-error {{Unused "kungFuDeathGrip" 'nsCOMPtr<Type>' objects constructed from members are prohibited}} expected-note {{Please switch all accesses to this member to go through 'kfdg_m1', or explicitly pass 'kfdg_m1' to `mozilla::Unused`}}
nsCOMPtr<Type> kfdg_m2 = p; // expected-error {{Unused "kungFuDeathGrip" 'nsCOMPtr<Type>' objects constructed from members are prohibited}} expected-note {{Please switch all accesses to this member to go through 'kfdg_m2', or explicitly pass 'kfdg_m2' to `mozilla::Unused`}}
nsCOMPtr<Type> kfdg_m3(p);
kfdg_m3.mPtr->f(nullptr, nullptr);
nsCOMPtr<Type> kfdg_m4 = p;
kfdg_m4.mPtr->f(nullptr, nullptr);
RefPtr<Type> kfdg_m5(p); // expected-error {{Unused "kungFuDeathGrip" 'RefPtr<Type>' objects constructed from members are prohibited}} expected-note {{Please switch all accesses to this member to go through 'kfdg_m5', or explicitly pass 'kfdg_m5' to `mozilla::Unused`}}
RefPtr<Type> kfdg_m6 = p; // expected-error {{Unused "kungFuDeathGrip" 'RefPtr<Type>' objects constructed from members are prohibited}} expected-note {{Please switch all accesses to this member to go through 'kfdg_m6', or explicitly pass 'kfdg_m6' to `mozilla::Unused`}}
RefPtr<Type> kfdg_m7(p);
kfdg_m7.mPtr->f(nullptr, nullptr);
RefPtr<Type> kfdg_m8 = p;
kfdg_m8.mPtr->f(nullptr, nullptr);
void f(nsCOMPtr<Type> ignoredArgument, Type *param) {
nsCOMPtr<Type> never_referenced;
Type t; // Type *p = nullptr;
nsCOMPtr<Type> kfdg_m1(t.p); // expected-error {{Unused "kungFuDeathGrip" 'nsCOMPtr<Type>' objects constructed from members are prohibited}} expected-note {{Please switch all accesses to this member to go through 'kfdg_m1', or explicitly pass 'kfdg_m1' to `mozilla::Unused`}}
nsCOMPtr<Type> kfdg_m2 = t.p; // expected-error {{Unused "kungFuDeathGrip" 'nsCOMPtr<Type>' objects constructed from members are prohibited}} expected-note {{Please switch all accesses to this member to go through 'kfdg_m2', or explicitly pass 'kfdg_m2' to `mozilla::Unused`}}
nsCOMPtr<Type> kfdg_m3(t.p);
kfdg_m3.mPtr->f(nullptr, nullptr);
nsCOMPtr<Type> kfdg_m4 = t.p;
kfdg_m4.mPtr->f(nullptr, nullptr);
RefPtr<Type> never_referenced2;
RefPtr<Type> kfdg_m5(t.p); // expected-error {{Unused "kungFuDeathGrip" 'RefPtr<Type>' objects constructed from members are prohibited}} expected-note {{Please switch all accesses to this member to go through 'kfdg_m5', or explicitly pass 'kfdg_m5' to `mozilla::Unused`}}
RefPtr<Type> kfdg_m6 = t.p; // expected-error {{Unused "kungFuDeathGrip" 'RefPtr<Type>' objects constructed from members are prohibited}} expected-note {{Please switch all accesses to this member to go through 'kfdg_m6', or explicitly pass 'kfdg_m6' to `mozilla::Unused`}}
RefPtr<Type> kfdg_m7(t.p);
kfdg_m7.mPtr->f(nullptr, nullptr);
RefPtr<Type> kfdg_m8 = t.p;
kfdg_m8.mPtr->f(nullptr, nullptr);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.