[ROOT-7321] GetActualClass loses 'const' in template Created: 06/May/15  Updated: 07/May/15  Resolved: 07/May/15

Status: Closed
Project: ROOT
Component/s: Core Libraries
Affects Version/s: None
Fix Version/s: 6.04.00

Type: Bug Priority: Medium
Reporter: Wim Lavrijsen Assignee: Philippe Canal
Resolution: Fixed Votes: 0
Labels: None

Mac OS X




the following only happens for newly instantiated types; not for builtins. Seen on Mac (it actually crashes on Linux):

root [0] gInterpreter->Declare( "template<typename T> struct Data { T fVal; };" )
(Bool_t) true
root [1] pair<const string, Data<int>> p;
root [2] TClass::GetClass("pair<const string, Data<int>>")->GetActualClass(&p)->GetName()
(const char *) "pair<string,Data<int> >"
root [3] 

I.e. the 'const' is lost in the name of the pair when asking for the actual class.

Thanks, Wim

Comment by Philippe Canal [ 07/May/15 ]

Hi Wim,

This problem (which was in the name normalization routines) has been fixed in the master and v6.02 patch branch.


Generated at Fri May 29 22:34:43 CEST 2020 using Jira 8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b.