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

always enable C++11 #416

Merged
merged 1 commit into from
Apr 1, 2024
Merged

always enable C++11 #416

merged 1 commit into from
Apr 1, 2024

Conversation

toge
Copy link
Contributor

@toge toge commented Mar 26, 2024

I met compilation error octomap/1.10.0 on gcc 5.4.

compilation error
In file included from ./octomap/include/octomap/OcTreeBaseImpl.h:83:0,
                 from ./octomap/include/octomap/OccupancyOcTreeBase.h:44,
                 from ./octomap/include/octomap/OcTreeStamped.h:39,
                 from ./octomap/src/OcTreeStamped.cpp:34:
./octomap/include/octomap/OcTreeIterator.hxx:45:13: error: expected nested-name-specifier before ‘iterator_category’
       using iterator_category = std::forward_iterator_tag;
             ^
./octomap/include/octomap/OcTreeIterator.hxx:46:13: error: expected nested-name-specifier before ‘value_type’
       using value_type = NodeType;
             ^
./octomap/include/octomap/OcTreeIterator.hxx:47:13: error: expected nested-name-specifier before ‘difference_type’
       using difference_type = NodeType;
             ^
./octomap/include/octomap/OcTreeIterator.hxx:48:13: error: expected nested-name-specifier before ‘pointer’
       using pointer = NodeType*;
             ^
./octomap/include/octomap/OcTreeIterator.hxx:49:13: error: expected nested-name-specifier before ‘reference’
       using reference = NodeType&;
             ^
In file included from ./octomap/include/octomap/OcTreeBaseImpl.h:83:0,
                 from ./octomap/include/octomap/OccupancyOcTreeBase.h:44,
                 from ./octomap/include/octomap/OcTree.h:38,
                 from ./octomap/src/OcTree.cpp:34:
./octomap/include/octomap/OcTreeIterator.hxx:45:13: error: expected nested-name-specifier before ‘iterator_category’
       using iterator_category = std::forward_iterator_tag;
             ^
./octomap/include/octomap/OcTreeIterator.hxx:46:13: error: expected nested-name-specifier before ‘value_type’
       using value_type = NodeType;
             ^
./octomap/include/octomap/OcTreeIterator.hxx:47:13: error: expected nested-name-specifier before ‘difference_type’
       using difference_type = NodeType;
             ^
./octomap/include/octomap/OcTreeIterator.hxx:48:13: error: expected nested-name-specifier before ‘pointer’
       using pointer = NodeType*;
             ^
./octomap/include/octomap/OcTreeIterator.hxx:49:13: error: expected nested-name-specifier before ‘reference’
       using reference = NodeType&;
             ^

It seems to be caused by using type alias.
type alias has been introduced C++11. ref

This PR ensures that C++11 is always used on CMakeLists.txt.

@ahornung ahornung merged commit 3c268e8 into OctoMap:devel Apr 1, 2024
2 checks passed
@toge
Copy link
Contributor Author

toge commented Apr 1, 2024

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

Successfully merging this pull request may close these issues.

2 participants