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

Remove depreciated inheritance of std::unary_function #264

Open
GWW opened this issue Aug 17, 2023 · 0 comments
Open

Remove depreciated inheritance of std::unary_function #264

GWW opened this issue Aug 17, 2023 · 0 comments

Comments

@GWW
Copy link

GWW commented Aug 17, 2023

Hi,

I have been trying to compile octopus with g++ v12.2.0 and I get errors related to std::unary_function being depreciated. I am not sure if removing these would cause problems with earlier versions of gcc. It seems like base class inheritance is being slowly being depreciated.

For example:

src/core/types/shared_haplotype.hpp:105:46: error: 'template<class _Arg, class _Result> struct std::unary_function' is deprecated [-Werror=deprecated-declarations]
  105 | struct hash<octopus::SharedHaplotype> : std::unary_function<octopus::SharedHaplotype, std::size_t>

I went through the files and removed the inheritance from the following files and it compiles succesfully:

core/types/shared_haplotype.hpp:struct hash<octopus::SharedHaplotype> : std::unary_function<octopus::SharedHaplotype, std::size_t>
core/types/indexed_haplotype.hpp:        : std::unary_function<octopus::IndexedHaplotype<IndexType, EqualityPolicy, IsSortedIndex>, std::size_t>
core/types/haplotype.hpp:template <> struct hash<octopus::Haplotype> : std::unary_function<octopus::Haplotype, std::size_t>
core/types/allele.hpp:: std::unary_function<octopus::BasicAllele<RegionTp>, std::size_t>
basics/cigar_string.hpp:struct hash<octopus::CigarOperation> : std::unary_function<octopus::CigarOperation, std::size_t>
basics/cigar_string.hpp:struct hash<octopus::CigarString> : std::unary_function<octopus::CigarString, std::size_t>
basics/aligned_read.hpp:template <> struct hash<octopus::AlignedRead> : std::unary_function<octopus::AlignedRead, std::size_t>
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