From 17bc860c2e6f26b324c23d5b259bfe2942138226 Mon Sep 17 00:00:00 2001 From: John Wellbelove Date: Thu, 30 Apr 2020 12:42:01 +0100 Subject: [PATCH] Added constexpr in place of enum for C++11 --- include/etl/sqrt.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/etl/sqrt.h b/include/etl/sqrt.h index 9fda08bf..5702c5ae 100644 --- a/include/etl/sqrt.h +++ b/include/etl/sqrt.h @@ -49,11 +49,15 @@ namespace etl etl::constant, etl::sqrt >::type type; - enum value_type +#if ETL_CPP11_SUPPORTED + static constexpr size_t value = type::value; +#else + enum { // Recursive definition. value = type::value }; +#endif }; }