Remove unused broken GetTypecode to allow building with GCC 8 #210
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This template function is unused (not in any public headers and not called from within clSPARSE), and has always been non-instantiable (and hence unusable) as char[4] to char& is an invalid conversion.
Older GCC didn't notice as we never try (instantiating a class template only instantiates those member functions that are used), but in GCC 8 its existence is an error:
/build/clsparse-0.10.2.0/src/library/io/mm-reader.cpp: In member function 'char& MatrixMarketReader::GetTypecode()':
/build/clsparse-0.10.2.0/src/library/io/mm-reader.cpp:123:16: error: invalid conversion from 'char*' to 'char' [-fpermissive]
return Typecode;
^~~~~~~~
/build/clsparse-0.10.2.0/src/library/io/mm-reader.cpp:123:16: error: cannot bind rvalue '(char)((char*)(&((MatrixMarketReader*)this)->MatrixMarketReader::Typecode))' to 'char&'
An alternative to removal is to change the char & to char *. Both options build in Debian (gcc 8.2, clsparse 0.10.2.0, where this problem was previously reported), but have not been built in develop or tested anywhere.