From cde6c46d2fff083166c3aca7fbf07df737c07cdc Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 3 Aug 2019 13:10:49 +0200 Subject: util/Macros: replace with std::size() (C++17) --- src/config/Templates.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/config') diff --git a/src/config/Templates.cxx b/src/config/Templates.cxx index 0641b03bb..01205c3d0 100644 --- a/src/config/Templates.cxx +++ b/src/config/Templates.cxx @@ -19,7 +19,8 @@ #include "Templates.hxx" #include "Option.hxx" -#include "util/Macros.hxx" + +#include #include @@ -77,7 +78,7 @@ const ConfigTemplate config_param_templates[] = { }; static constexpr unsigned n_config_param_templates = - ARRAY_SIZE(config_param_templates); + std::size(config_param_templates); static_assert(n_config_param_templates == unsigned(ConfigOption::MAX), "Wrong number of config_param_templates"); @@ -95,7 +96,7 @@ const ConfigTemplate config_block_templates[] = { }; static constexpr unsigned n_config_block_templates = - ARRAY_SIZE(config_block_templates); + std::size(config_block_templates); static_assert(n_config_block_templates == unsigned(ConfigBlockOption::MAX), "Wrong number of config_block_templates"); -- cgit v1.2.3