Compiler Error C2531
TOC
Collapse the table of content
Expand the table of content

Compiler Error C2531

 

'identifier' : reference to a bit field illegal

References to bit fields are not allowed.

The following sample generates C2531:

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