diff --git a/doc/links.md b/doc/links.md index beee8853d..a82374dfe 100644 --- a/doc/links.md +++ b/doc/links.md @@ -246,15 +246,17 @@ void setFrom(FromU value); ``` Compilation will fail unless the following conditions are met -- The object this method is called on has to be `Mutable`. (first part inside the `std::enable_if`) -- The passed in `value` is either a `Mutable` or default class of type `FromT`. (second part inside the `std::enable_if`) +- The object this method is called on has to be `Mutable`. +- The passed in `value` is either a `Mutable` or default class of type `FromT`. In some cases the template signature looks like this ```cpp -template> -void setWeight(float weight); +template + requires(Mut && Mutable) +void setWeight(float value) { + m_obj->data.weight = value; +} ``` The reason to have a defaulted `bool` template parameter here is the same as the