Fix: missing typename in URCU_FORCE_CAST
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 30 Jul 2024 19:21:07 +0000 (19:21 +0000)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 30 Jul 2024 19:33:31 +0000 (15:33 -0400)
commitebd83c14476470e7b06b2720d7cc61993c135fe3
tree08b8728bf9597dc45ff8033896773b06ce35aff4
parent86cca1f6d1a6052817ed671255b022f04a22226f
Fix: missing typename in URCU_FORCE_CAST

When using rcu_dereference() in the method of a templated class on a pointer
whose type is determined by the template arguments, the following error occurs
(using g++ 13.2.0):

  ../../src/common/urcu.hpp:387:39: error: need 'typename' before 'std::remove_cv<__typeof__ (((lttng::urcu::rcu_list_iteration_adapter<ContainedType, Member>::iterator*)this)->_node_contents.next)>::type' because 'std::remove_cv<__typeof__ (((lttng::urcu::rcu_list_iteration_adapter<ContainedType, Member>::iterator*)this)->_node_contents.next)>' is a dependent scope

`typename` is necessary here since the result of the template argument provided
to std::remove_cv can be a dependant type and we are required to inform the
compiler of this dependency.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I209fc5f46fee372bf673fc04c5a55d4827238b19
include/urcu/compiler.h
This page took 0.025445 seconds and 4 git commands to generate.