From e41024bc9a693164ffc64048046469aaa81a07d4 Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Wed, 24 Nov 2021 00:00:21 +0300 Subject: Rename o3tl::underlyingEnumValue to o3tl::to_underlying to match C++23 Change-Id: I1597a8e77199445bf377dbe54adc3134bb04fd51 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125748 Tested-by: Jenkins Reviewed-by: Mike Kaganski --- include/o3tl/underlyingenumvalue.hxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/o3tl/underlyingenumvalue.hxx') diff --git a/include/o3tl/underlyingenumvalue.hxx b/include/o3tl/underlyingenumvalue.hxx index 1684b2da17d9..a913ab385381 100644 --- a/include/o3tl/underlyingenumvalue.hxx +++ b/include/o3tl/underlyingenumvalue.hxx @@ -16,8 +16,9 @@ namespace o3tl { +// An implementation of C++23 std::to_underlying // For a value e of an enumeration type T, return the corresponding value of T's underlying type: -template constexpr std::underlying_type_t underlyingEnumValue(T e) +template constexpr std::underlying_type_t to_underlying(T e) { return static_cast>(e); } -- cgit