Skip to content
Snippets Groups Projects
Commit 9dc3c035 authored by Danilo Piparo's avatar Danilo Piparo
Browse files

[Core] Add TClass::GetClass<T> method to lower contention

The method TClass::GetClass<T> obtains the TClass instance pointer
corresponding to T in two ways, according to the nature of T.
If T inherits from or is TObject, the TClass* value is obtained via the
T::Class() static method, which locks only upon the first call.
If T is a generic type, internally the TClass::GetClass(type_info, ...)
method is called.

The new functionality is put to a good use by this commit in TBuffer
and TDirectoryFile.

It is worth noting how the usage of tag dispatching could be replaced
by 'if constexpr'.
parent 0449786b
No related branches found
No related tags found
No related merge requests found
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