Skip to content

Commit

Permalink
Remove no longer applicable enable_if from doc
Browse files Browse the repository at this point in the history
  • Loading branch information
tmadlener committed Dec 18, 2024
1 parent a70728e commit ee64603
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions doc/links.md
Original file line number Diff line number Diff line change
Expand Up @@ -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<bool Mut = Mutable,
typename = std::enable_if<Mut && Mutable>>
void setWeight(float weight);
template <bool Mut = Mutable>
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
Expand Down

0 comments on commit ee64603

Please sign in to comment.