cpp-common/bt2c/fmt.hpp: use `wise_enum::string_type` in `EnableIfIsWiseEnum` definition master
authorSimon Marchi <simon.marchi@efficios.com>
Mon, 29 Apr 2024 19:42:14 +0000 (19:42 +0000)
committerSimon Marchi <simon.marchi@efficios.com>
Tue, 30 Apr 2024 02:44:34 +0000 (22:44 -0400)
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 <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/12497
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
src/cpp-common/bt2c/fmt.hpp

index a78d7a61af83f37bb7f5b4c96c0035b568401908..ab3d6bc875de3514ac5fa2fb4b8e2548f38cece4 100644 (file)
@@ -13,7 +13,7 @@ namespace internal {
 
 template <typename T>
 using EnableIfIsWiseEnum =
-    typename std::enable_if<wise_enum::is_wise_enum<T>::value, const char *>::type;
+    typename std::enable_if<wise_enum::is_wise_enum<T>::value, wise_enum::string_type>::type;
 
 } /* namespace internal */
 
This page took 0.02464 seconds and 4 git commands to generate.