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

Not compatible with C++98 #12

Open
Nurgak opened this issue Mar 23, 2017 · 0 comments
Open

Not compatible with C++98 #12

Nurgak opened this issue Mar 23, 2017 · 0 comments

Comments

@Nurgak
Copy link

Nurgak commented Mar 23, 2017

When I try to compile this library (required by another library/component) I get the following error:

Building CXX object src/CMakeFiles/pocolog_cpp.dir/IndexFile.cpp.o
/home/karl/dev/tools/pocolog_cpp/src/LogFile.cpp: In destructor ‘pocolog_cpp::LogFile::~LogFile()’:
/home/karl/dev/tools/pocolog_cpp/src/LogFile.cpp:62:21: error: range-based ‘for’ loops are not allowed in C++98 mode
     for(Stream *s : streams)
                     ^
/home/karl/dev/tools/pocolog_cpp/src/LogFile.cpp:65:28: error: range-based ‘for’ loops are not allowed in C++98 mode
     for(IndexFile *index : indexFiles)
                            ^
make[2]: *** [src/CMakeFiles/pocolog_cpp.dir/LogFile.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/home/karl/dev/tools/pocolog_cpp/src/IndexFile.cpp: In destructor ‘pocolog_cpp::IndexFile::~IndexFile()’:
/home/karl/dev/tools/pocolog_cpp/src/IndexFile.cpp:48:24: error: range-based ‘for’ loops are not allowed in C++98 mode
     for(Index *index : indices)
                        ^
make[2]: *** [src/CMakeFiles/pocolog_cpp.dir/IndexFile.cpp.o] Error 1
make[1]: *** [src/CMakeFiles/pocolog_cpp.dir/all] Error 2
make: *** [all] Error 2

Is there a standard fix for that or must I explicitly use C++11?

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