From: Simon Marchi Date: Mon, 29 Apr 2024 19:42:14 +0000 (+0000) Subject: cpp-common/bt2c/fmt.hpp: use `wise_enum::string_type` in `EnableIfIsWiseEnum` definition X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=HEAD;ds=sidebyside cpp-common/bt2c/fmt.hpp: use `wise_enum::string_type` in `EnableIfIsWiseEnum` definition wise_enum uses `const char *` as the string type for C++11/14 and `std::string_view` for C++ >= 17. Change `EnableIfIsWiseEnum` to use `wise_enum::string_type` instead of a hard-coded `const char *`, to make compilation in C++17 possible. Change-Id: Ie179e1f5585128950ecdc095f7b136d93ea39e41 Signed-off-by: Simon Marchi Reviewed-on: https://review.lttng.org/c/babeltrace/+/12497 Tested-by: jenkins Reviewed-by: Philippe Proulx --- diff --git a/src/cpp-common/bt2c/fmt.hpp b/src/cpp-common/bt2c/fmt.hpp index a78d7a61..ab3d6bc8 100644 --- a/src/cpp-common/bt2c/fmt.hpp +++ b/src/cpp-common/bt2c/fmt.hpp @@ -13,7 +13,7 @@ namespace internal { template using EnableIfIsWiseEnum = - typename std::enable_if::value, const char *>::type; + typename std::enable_if::value, wise_enum::string_type>::type; } /* namespace internal */