Como impedir a geração de modelos para objetos que não implementam um método

Então, com o propósito de exemplo, digamos que eu tenho 3 simplesstructs, o segundo dos quais não contém umbar método:

struct one {
    void foo(const int);
    void bar();
};

struct two {
    void foo(const int);
};

struct three {
    void foo(const int);
    void bar();
};

Então eu tenho umstruct que gerenciará objetos desses tipos:

struct owner {
    map<int, one> ones;
    map<int, two> twos;
    map<int, three> threes;

    template <typename T, typename Func>
    void callFunc(T& param, const Func& func) {
        func(param);
    }

    template <typename T>
    void findObject(int key, const T& func) {
        if(ones.count(key) != 0U) {
            callFunc(ones[key], func);
        } else if(twos.count(key) != 0U) {
            callFunc(twos[key], func);
        } else {
            callFunc(threes[key], func);
        }
    }

    void foo(const int key, const int param) { findObject(key, [&](auto& value) { value.foo(param); } ); }
    void bar(const int key) { findObject(key, [&](auto& value) { value.bar(); } ); }
};

Quando tento compilar isso, recebo:

erro:struct two&nbsp;não tem nenhum membro chamadobar

Existe uma maneira de resolver isso?

Exemplo ao vivo