Share via


編譯器錯誤 C2531

'identifier' : 位元欄位的參考不合法

不允許位元欄位 (Bit Field) 的參考。

下列範例會產生 C2531:

// C2531.cpp
// compile with: /c
class P {
   int &b1 : 10;   // C2531
   int b2 : 10;   // OK
};