How do I solve this?
One way would be to make the function taking a bool by value take it by non-const reference and rvalue reference instead:
virtual container_t<T> foo(const T& value1, const T& value2) const = 0;
// instead of taking the `bool` by value:
virtual container_t<bool> foo(bool& value1, const T& value2) const = 0;
virtual container_t<bool> foo(bool&& value1, const T& value2) const = 0;
... and you'll then have to override both of them.