jeudi 8 juin 2023

boost::flyweight -- Who is attempting to call compare::operator()() with two arguments of type boost::flyweights::detail::ref_counted_value<>? [closed]

I'm getting a compiler error because somebody is attempting to call

template<typename KEY, typename VALUE>
bool compare::operator()(
    const boost::flyweights::detail::refcounted_value<VALUE, KEY>&_r0,
    const boost::flyweights::detail::refcounted_value<VALUE, KEY>&_r1
) const;

I cannot figure out, who is attempting to do this. I'm passing the compare functor to boost::flyweights::set_factory<compare>. The same error happens with both compilers, visual C++ and g++-10.

The class in question (refcounted_value) is an internal class used by flyweight and I'm not referring to it directly.

The error is caused by my functor not providing this method. Everything compiles if I do.

I would like to answer this question, if the local block-kapos let me!

Aucun commentaire:

Enregistrer un commentaire