79138933

Date: 2024-10-29 20:46:24
Score: 3.5
Natty:
Report link

These answers studious avoid the question: how do you constrain a concept by another concept. For example, maybe I want a function that only produces complex numbers, but I don't care what complex number iteration is being used. Let's pretend that such a concept exists.

template<typename T>
concept complex_rooter = requires(const T ct, std::numeric auto x) {
  { ct.sqrt(x) } -> std::convertible_to<std::complex auto>
}

In both cases, you cannot use a concept.

Okay, fine, that's the syntax, so what do you do?

Reasons:
  • Blacklisted phrase (1): how do you
  • RegEx Blacklisted phrase (1): I want
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Low reputation (0.5):
Posted by: Zendel