Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not compile with g++ 4.9 #562

Closed
oktal opened this issue Feb 27, 2016 · 0 comments
Closed

Does not compile with g++ 4.9 #562

oktal opened this issue Feb 27, 2016 · 0 comments

Comments

@oktal
Copy link
Contributor

oktal commented Feb 27, 2016

Hi,

I tried compiling rapidjson with g++4.9 but it fails with some -Weffc++ related errors:

[ 46%] Building CXX object example/CMakeFiles/parsebyparts.dir/parsebyparts/parsebyparts.cpp.o
/home/octal/code/rapidjson/example/parsebyparts/parsebyparts.cpp: In instantiation of ‘AsyncDocumentParser<parseFlags>::AsyncDocumentParser(rapidjson::Document&) [with unsigned int parseFlags = 0u; rapidjson::Document = rapidjson::GenericDocument<rapidjson::UTF8<> >]’:
/home/octal/code/rapidjson/example/parsebyparts/parsebyparts.cpp:131:39:   required from here
/home/octal/code/rapidjson/example/parsebyparts/parsebyparts.cpp:20:5: error: ‘AsyncDocumentParser<>::mutex_’ should be initialized in the member initialization list [-Werror=effc++]
     AsyncDocumentParser(Document& d) : stream_(*this), d_(d), parseThread_(&AsyncDocumentParser::Parse, this), completed_() {}
     ^
/home/octal/code/rapidjson/example/parsebyparts/parsebyparts.cpp:20:5: error: ‘AsyncDocumentParser<>::notEmpty_’ should be initialized in the member initialization list [-Werror=effc++]
/home/octal/code/rapidjson/example/parsebyparts/parsebyparts.cpp:20:5: error: ‘AsyncDocumentParser<>::finish_’ should be initialized in the member initialization list [-Werror=effc++]
cc1plus: all warnings being treated as errors
g++ --version
g++ (Ubuntu 4.9.2-10ubuntu13) 4.9.2
uname -ra
Linux octal-desk 3.19.0-47-generic #53-Ubuntu SMP Mon Jan 18 14:02:48 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

I'd like to include your library as a "thirdparty" in my framework, but I need it to compile first. The issue above looks pretty easy to fix, I can contribute if you want me to. Otherwise, I'll have to fork or subtree and remove the parts that do not compile I guess :(

Also, here is the hash I'm using:

commit 2d5d9363d812886c7ae6ac1238dc8f0c55e4b893
Merge: 4de9ba5 c62a19c
Author: Milo Yip <miloyip@gmail.com>
Date:   Sun Feb 28 01:22:44 2016 +0800

    Merge pull request #556 from miloyip/example_parsebyparts

    Add parse-by-parts example

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant