cpp-common/bt2c: make some constructors of CStringView constexpr
authorSimon Marchi <simon.marchi@efficios.com>
Tue, 16 Jan 2024 18:59:43 +0000 (13:59 -0500)
committerSimon Marchi <simon.marchi@efficios.com>
Mon, 29 Jan 2024 16:38:19 +0000 (11:38 -0500)
Change-Id: I56daad7dae1bc65183f016a1a9d2d6c529b3569d
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/11689
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
src/cpp-common/bt2c/c-string-view.hpp

index fb1b3a658aeb87fab893da56d52c380780f7d25f..a7b54e70651fa271c3cc1dc71793a9ae044e19dd 100644 (file)
@@ -31,14 +31,14 @@ public:
      *
      * Intentionally not explicit.
      */
-    CStringView() noexcept = default;
+    constexpr CStringView() noexcept = default;
 
     /*
      * Builds a view of the C string `str` (may be `nullptr`).
      *
      * Intentionally not explicit.
      */
-    CStringView(const char * const str) noexcept : _mStr {str}
+    constexpr CStringView(const char * const str) noexcept : _mStr {str}
     {
     }
 
This page took 0.027734 seconds and 4 git commands to generate.