mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-10-24 03:53:18 +08:00
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.
```
This commit is contained in:
@@ -425,7 +425,7 @@ void FastWriter::writeValue(const Value& value) {
|
|||||||
// //////////////////////////////////////////////////////////////////
|
// //////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
StyledWriter::StyledWriter()
|
StyledWriter::StyledWriter()
|
||||||
: rightMargin_(74), indentSize_(3), addChildValues_() {}
|
: rightMargin_(74), indentSize_(3), addChildValues_(false) {}
|
||||||
|
|
||||||
JSONCPP_STRING StyledWriter::write(const Value& root) {
|
JSONCPP_STRING StyledWriter::write(const Value& root) {
|
||||||
document_.clear();
|
document_.clear();
|
||||||
|
|||||||
Reference in New Issue
Block a user