Build fix: missing operator- for iterator on g++7
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 12 Mar 2024 19:48:09 +0000 (15:48 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 12 Mar 2024 19:48:09 +0000 (15:48 -0400)
commitd83ba9baef029eedf530d272d95487e9c59d4226
treec2aeeee7389406d5d32e508ec3db16695940cbd3
parent283a96e49f066a4263726271bc64aa7e94ae0e92
Build fix: missing operator- for iterator on g++7

The project fails to build on 'g++ (SUSE Linux) 7.5.0' since its STL
implementation assumes that operator- is available for random access
iterators.

The build fails with the following error:

  event_name.cpp:82:71:   required from here
  /usr/include/c++/7/bits/stl_iterator_base_funcs.h:104:21: error: no match for ‘operator-’ (operand types are ‘lttng::utils::random_access_container_wrapper<const bt_value*, const char*, event_name_set_operations>::_iterator<const lttng::utils::random_access_container_wrapper<const bt_value*, const char*, event_name_set_operations>, const char* const>’ and ‘lttng::utils::random_access_container_wrapper<const bt_value*, const char*, event_name_set_operations>::_iterator<const lttng::utils::random_access_container_wrapper<const bt_value*, const char*, event_name_set_operations>, const char* const>’)

A trivial implementation of that operator is provided and allows the
build to succeed.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: Ib1637e81e5cdc42cd5a142dcee21150ced9fcc55
src/common/container-wrapper.hpp
This page took 0.024694 seconds and 4 git commands to generate.