提交 7d16e101 编写于 作者: F fangguo 提交者: Hans Johnson

fiexd “Cannot take the address of a bit field.”


```c++
 #include <iostream>

class TestBool
{
public:
    TestBool():addChildValues_(){}
    TestBool(int):addChildValues_(false){}
    bool addChildValues_ : 1;
    bool indented_ : 1;
};


int main()
{
    std::cout << "\n TestBool () addChildValues_ = " << TestBool().addChildValues_;
    std::cout << "\n TestBool false addChildValues_ = " << TestBool(3).addChildValues_;
    return 0;
}
```

```text
root@osssvr-1 # /opt/SUNWspro/prod/bin/CC  testbool.cpp -o testbool   
Error: Cannot take the address of a bit field.
1 Error(s) detected.
```
上级 d8723104
......@@ -425,7 +425,7 @@ void FastWriter::writeValue(const Value& value) {
// //////////////////////////////////////////////////////////////////
StyledWriter::StyledWriter()
: rightMargin_(74), indentSize_(3), addChildValues_() {}
: rightMargin_(74), indentSize_(3), addChildValues_(false) {}
JSONCPP_STRING StyledWriter::write(const Value& root) {
document_.clear();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册