Skip to content

Not compatible with C++98 #12

Description

@Nurgak

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions