Kompilatorfel C2254

"funktion" : ren specificerare eller abstrakt åsidosättningsspecificerare tillåts inte för vänfunktionen

Anmärkningar

En friend funktion anges som ren virtual.

Example

I följande exempel genereras C2254:

// C2254.cpp
// compile with: /c
class A {
public:
   friend void func1() = 0;   // C2254, func1 is friend
   void virtual func2() = 0;   // OK, pure virtual
   friend void func3();   // OK, friend not virtual nor pure
};

void func1() {}
void func3() {}