We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ranges/cpp/Platform.Ranges/RangeExtensions.h
Lines 5 to 23 in d7b5ac8
do that like this:
template<typename T> public: static T Difference(Range<T> range) { return range.Maximum - range.Minimum; }
Return type is T, but we can also use auto.
T
auto
The text was updated successfully, but these errors were encountered:
In the C++20 standard we can use
template<typename T> requires requires(T maximum, T minimum) { maximum - minimum; } public: static T Difference(Range<T> range) { return range.Maximum - range.Minimum; }
For all types with operator- or builtin '-'
operator-
builtin '-'
Sorry, something went wrong.
Yes, we can. Looks like this issue was solved by #61
No branches or pull requests
Ranges/cpp/Platform.Ranges/RangeExtensions.h
Lines 5 to 23 in d7b5ac8
do that like this:
Return type is
T
, but we can also useauto
.The text was updated successfully, but these errors were encountered: