Skip to content

modify ToolHandle to allow non-const correctness

Charles Leggett requested to merge leggett/Gaudi:dev/AllowNCTool into master

The series of merges related to enforcing const behavior for ToolHandles, has been an utter and complete nightmare for ATLAS. It has broken hundreds of packages, requiring many, many hundreds of files to be touched. While these problems are real, and do require attention, they only affect behavior when running with multiple threads, and do not affect serial code. However instead of allowing a gentle migration strategy to this const enforcement policy, the changes broke everything. This is not good.

This merge reverses the const enforcement if appropriate compile time flags are used. It also offers a compile time deprecation warning to identify problematic code.

if compiled with -DALLOW_TOOLHANDLE_NONCONSTNESS, can call non-const methods of a Tool from a const ToolHandle.

Also adds a ToolHandle.unConst() method which strips the constness of the ToolHandle, but prints a deprecation warning message at compile time. Requires -DATLAS.

Merge request reports