forked from dlang/phobos
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Better std.algorithm.comparison.clamp error messages
- Loading branch information
Showing
2 changed files
with
20 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Better static assert messages for `std.algorithm.comparison.clamp` | ||
|
||
Until now, `clamp` used a template constraint to check if the passed types | ||
could be used. If they were not, it was very tedious to figure out why. | ||
|
||
As the template constraint is not used for overload resolution | ||
the constrains are moved into static asserts with expressive error | ||
messages. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters