Skip to content
This repository was archived by the owner on May 31, 2024. It is now read-only.

Conversation

@jbj
Copy link

@jbj jbj commented Mar 18, 2019

Current Clang versions and GCC < 8 have ignored that the return type was wrong on this function, probably because of overeager SFINAE implementations, but it's a hard error on GCC 8.

This commit fixes compilation on Ubuntu 18.10.

Current Clang versions and GCC < 8 have ignored that the return type was wrong on this function, probably because of overeager SFINAE implementations, but it's a hard error on GCC 8.

This commit fixes compilation on Ubuntu 18.10.
@jbj
Copy link
Author

jbj commented Mar 18, 2019

I'm opening this PR because we'll soon upgrade lgtm.com to Ubuntu 18.10, and the upgrade will break this project and its dependencies unless the compilation error is fixed.

For the record, this is the compilation error I'm getting with GCC 8.2.0:

[2019-03-13 16:33:20] [build] In file included from /opt/src/src/importers/Importer.hpp:32,
[2019-03-13 16:33:20] [build]                  from /opt/src/src/importers/STL10MatrixImporter.hpp:28,
[2019-03-13 16:33:20] [build]                  from /opt/src/src/importers/STL10MatrixImporter.cpp:24:
[2019-03-13 16:33:20] [build] /opt/src/src/types/Batch.hpp: In member function ‘std::vector<long unsigned int> mic::types::Batch<DataType, LabelType>::indices(size_t)’:
[2019-03-13 16:33:20] [build] /opt/src/src/types/Batch.hpp:136:31: error: could not convert ‘index_->((mic::types::Batch<DataType, LabelType>*)this)->mic::types::Batch<DataType, LabelType>::sample_indices.std::vector<long unsigned int>::operator[]()’ from ‘__gnu_cxx::__alloc_traits<std::allocator<long unsigned int>, long unsigned int>::value_type’ {aka ‘long unsigned int’} to ‘std::vector<long unsigned int>’
[2019-03-13 16:33:20] [build]    return sample_indices[index_];
[2019-03-13 16:33:20] [build]                                ^

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant