From 46c1cfa209c0a97fc02e14a9bc7455b9ad41dbb3 Mon Sep 17 00:00:00 2001 From: Chip Hogg Date: Tue, 25 Jun 2024 11:12:25 -0400 Subject: [PATCH] Clarify why we're not using lambdas (#252) Turns out, they can't be `constexpr` until C++17, but we must support C++14. --- au/math.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/au/math.hh b/au/math.hh index 499194ac..5566978d 100644 --- a/au/math.hh +++ b/au/math.hh @@ -319,7 +319,7 @@ constexpr bool isnan(QuantityPoint p) { } namespace detail { -// Some compilers do not support lambdas in constexpr contexts, so we make a manual function object. +// We can't use lambdas in `constexpr` contexts until C++17, so we make a manual function object. struct StdMaxByValue { template constexpr auto operator()(T a, T b) const { @@ -374,7 +374,7 @@ constexpr auto max(T x, Zero z) { } namespace detail { -// Some compilers do not support lambdas in constexpr contexts, so we make a manual function object. +// We can't use lambdas in `constexpr` contexts until C++17, so we make a manual function object. struct StdMinByValue { template constexpr auto operator()(T a, T b) const {