Opened 5 years ago

Last modified 5 years ago

#13501 new Bugs

no matching function for call to 'hash_value' while compiling program with clang on osx

Reported by: travis.wrightsman@… Owned by: Daniel James
Milestone: To Be Determined Component: hash
Version: Boost 1.64.0 Severity: Problem
Keywords: hash clang osx llvm Cc:

Description

I am getting the following error while building an external program (augustus 3.3 with CGP and sqlite support, https://circleci.com/gh/bioconda/bioconda-recipes/6507) with clang on osx:

include/boost/functional/hash/extensions.hpp:262:20: error: no matching function for call to 'hash_value'
            return hash_value(val);
                   ^~~~~~~~~~

Change History (5)

comment:1 by Daniel James, 5 years ago

Thanks for the report. Please can you post the template instantiation info from the error message so that I can see what type this happens for? I suspect it might be char16_t, char32_t, u16string or u32string, which we added support for in 1.65.0.

comment:2 by Daniel James, 5 years ago

Sorry, I just looked at the log on circleci, and it's vector<bool>. I'll look into it.

comment:3 by anonymous, 5 years ago

Hi Daniel, just a heads up in case this is not due to Boost, this may be due to hardcoded Makefile errors in the external program, discussed here: https://github.com/bioconda/bioconda-recipes/pull/8440

comment:4 by Daniel James, 5 years ago

I suspect it's a problem with libc++'s vector<bool>. For libstdc++ vector<bool>::const_iterator::reference is bool which hash supports, I'm guessing that for libc++ it's something else which isn't supported. I don't have libc++ installed at the moment, so I can't check just yet.

comment:5 by marcel.bargull@…, 5 years ago

Makes sense. I know next to nothing about libstdc++ and libc++'s implementations, but a quick search on the libstc++ GitHub mirror supports your suspection:

github.com/llvm-mirror/libcxx/blob/88626bf496e9a1276652790438b389e65950629f/include/vector#L2160-L2162

github.com/llvm-mirror/libcxx/blob/018a3d51a47f7275c59e802709104498b729522b/include/bit_reference#L1092

github.com/llvm-mirror/libcxx/blob/018a3d51a47f7275c59e802709104498b729522b/include/bit_reference#L124

If I read that right, then __bit_const_reference is the type of vector<bool>::const_iterator::reference.

Note: See TracTickets for help on using tickets.