Fix: field-path.hpp: add missing `shared-obj.hpp` include
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Wed, 16 Mar 2022 15:30:54 +0000 (11:30 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Mon, 11 Sep 2023 15:24:02 +0000 (11:24 -0400)
gcc 9.3 emits the following warning when including the `field-path.hpp`
file by itself:
  ../../../../src/cpp-common/bt2/field-path.hpp:180:5: error: return type ‘using Shared = class bt2::internal::SharedObj<bt2::ConstFieldPath, const bt_field_path, bt2::internal::FieldPathRefFuncs>’ {aka ‘class bt2::internal::SharedObj<bt2::ConstFieldPath, const bt_field_path, bt2::internal::FieldPathRefFuncs>’} is incomplete
    180 |     {
        |     ^
  ../../../../src/cpp-common/bt2/field-path.hpp: In member function ‘void bt2::ConstFieldPath::shared() const’:
  ../../../../src/cpp-common/bt2/field-path.hpp:181:29: error: too many initializers for ‘bt2::ConstFieldPath::Shared’ {aka ‘bt2::internal::SharedObj<bt2::ConstFieldPath, const bt_field_path, bt2::internal::FieldPathRefFuncs>’}
    181 |         return Shared {*this};
        |                             ^

Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Change-Id: If18d48f16eb6ecb5b14e12a9c8314392c3f3698e
Reviewed-on: https://review.lttng.org/c/babeltrace/+/7604
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/10786
CI-Build: Philippe Proulx <eeppeliteloop@gmail.com>
Tested-by: jenkins <jenkins@lttng.org>
src/cpp-common/bt2/field-path.hpp

index ed08a4796dd5b30825e2ecea3c2f608054256c1b..4031ee0aab703e09e82ad4e34867ad7046632e56 100644 (file)
@@ -12,6 +12,7 @@
 
 #include "common/assert.h"
 #include "internal/borrowed-obj.hpp"
+#include "internal/shared-obj.hpp"
 
 namespace bt2 {
 
This page took 0.027191 seconds and 4 git commands to generate.