id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc
12645,error: no match for call to ‘(const hash) (const boost::recursive_variant_&)’,mike.gresens@…,Antony Polukhin,"Since boost 1.62 the recursive variant is not able to find the hash function.[[BR]]
Same for boost 1.63 beta.[[BR]]
Compiler stops with error: no match for call to ‘(const hash) (const boost::recursive_variant_&)’
code:
{{{
#include
#include
struct hash;
using int_t = int;
template
using basic_set_t = std::unordered_set;
using value_t = boost::make_recursive_variant<
int_t,
basic_set_t
>::type;
using set_t = basic_set_t;
struct hash
{
// since boost 1.62 ... error: no match for call to ‘(const hash) (const boost::recursive_variant_&)’
size_t operator()(const value_t& value) const
{
return 0;
}
};
int main()
{
set_t s;
int_t i = 3;
value_t v = i;
s.emplace(v); // raises error above
v = s;
return 0;
}
}}}
gcc 6.2.0 on Linux[[BR]]
clang 7.0.2 on Mac",Bugs,closed,Boost 1.64.0,variant,Boost 1.63.0,Regression,fixed,,