79082792

Date: 2024-10-13 09:18:01
Score: 1
Natty:
Report link

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.

Reasons:
  • Blacklisted phrase (1): How do I
  • RegEx Blacklisted phrase (1.5): solve this?
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Starts with a question (0.5): How do I solve this
  • High reputation (-2):
Posted by: Ted Lyngmo