Skip to content
Snippets Groups Projects
Commit 0c541ffa authored by scott snyder's avatar scott snyder Committed by Marco Clemencic
Browse files

Work around issue with clang implicit instantiation in C++ mode.

GaudiHandleBase has a virtual destructor which is declared with `=default'.
However. in C++20 mode, clang will then try to instiantiate all the virtual
functions for classes derived from this whenever the declarations
for those classes are seen.  The upshot is that then using Gaudi handles
with forward-declared classes doesn't work (even if the handle is only
declared in the header but not used in any way).

It turns out that we can avoid this behavior by changing the declaration
of the base class destructor to say `{}' instead of `=default'.
(This is perhaps a clang bug, but the standard is not very clear
on exactly when virtual members of the templated class are required
to be or not to be implicitly instantiated.)

See also ATLINFR-5113.
parent a69fcfa6
No related branches found
No related tags found
1 merge request!1511Work around issue with clang implicit instantiation in C++20 mode.
This commit is part of merge request !1511. Comments created here will be created in the context of that merge request.
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment