Skip to content

Commit

Permalink
Add TODO for C++20
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Konradi <akonradi@google.com>
  • Loading branch information
akonradi committed Nov 23, 2020
1 parent 4c457c3 commit 72d8755
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions source/common/common/interval_value.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ template <typename T, typename Interval> class ClosedIntervalValue {
T value_;
};

// C++17 doesn't allow templating on floating point values, otherwise that's
// what we should do here instead of relying on a int => float implicit
// conversion. TODO(akonradi): when Envoy is using C++20, switch these template
// parameters to floats.

// Floating point value in the range [0, 1].
using UnitFloat = ClosedIntervalValue<float, Interval<int, 0, 1>>;

} // namespace Envoy

0 comments on commit 72d8755

Please sign in to comment.