[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
Environment:

Mac OS X


Development:

 Description   

Philippe,

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



 Comments   
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.

Cheers,
Philippe.

Generated at Tue Sep 24 11:01:06 CEST 2019 using Jira 7.13.1#713001-sha1:5e06076c2d215a6f699b7e5c90ab2fae7ba5a1ce.