From 219233d846ed6141ff87c6df59c9ab6212fcb0e6 Mon Sep 17 00:00:00 2001 From: sha512sum Date: Wed, 17 Apr 2024 23:18:14 +0000 Subject: [PATCH] Counter use 0 in start --- include/utempl/loopholes/counter.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/utempl/loopholes/counter.hpp b/include/utempl/loopholes/counter.hpp index f4d773d..a1ca9f5 100644 --- a/include/utempl/loopholes/counter.hpp +++ b/include/utempl/loopholes/counter.hpp @@ -24,9 +24,9 @@ consteval auto Counter(std::size_t arg) requires Injected{} template < typename Tag, typename... Ts, - auto R = impl::Counter<0, Tag, Ts...>(std::size_t{}) + std::size_t R = impl::Counter<0, Tag, Ts...>(std::size_t{}) - 1 > -consteval auto Counter(auto...) { +consteval auto Counter(auto...) -> std::size_t { return R; };