From ee64603970a74f2fdfa2f8cea7c61a7e81be0580 Mon Sep 17 00:00:00 2001 From: Thomas Madlener Date: Wed, 18 Dec 2024 15:52:46 +0100 Subject: [PATCH] Remove no longer applicable enable_if from doc --- doc/links.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) 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