summaryrefslogtreecommitdiffstats
path: root/include/o3tl/underlyingenumvalue.hxx
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2021-11-24 00:00:21 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2021-11-24 05:30:53 +0100
commite41024bc9a693164ffc64048046469aaa81a07d4 (patch)
tree11d599f808095f535f00fb0cb818b25875f517a8 /include/o3tl/underlyingenumvalue.hxx
parentUpdate git submodules (diff)
downloadcore-e41024bc9a693164ffc64048046469aaa81a07d4.tar.gz
core-e41024bc9a693164ffc64048046469aaa81a07d4.zip
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 <mike.kaganski@collabora.com>
Diffstat (limited to 'include/o3tl/underlyingenumvalue.hxx')
-rw-r--r--include/o3tl/underlyingenumvalue.hxx3
1 files changed, 2 insertions, 1 deletions
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 <typename T> constexpr std::underlying_type_t<T> underlyingEnumValue(T e)
+template <typename T> constexpr std::underlying_type_t<T> to_underlying(T e)
{
return static_cast<std::underlying_type_t<T>>(e);
}