struct bitfield { int i = 0; // ok int j : 8 = 0; // error: lvalue required as left operand of assignment };
使用C++ 11"类内初始化"功能初始化位字段的正确语法是什么?
c++ bit-fields in-class-initialization c++11
bit-fields ×1
c++ ×1
c++11 ×1
in-class-initialization ×1