Uploaded image for project: 'ROOT'
  1. ROOT
  2. ROOT-7321

GetActualClass loses 'const' in template

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.04.00
    • Component/s: Core Libraries
    • Labels:
      None
    • Environment:

      Mac OS X

      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

        Attachments

          Activity

            People

            • Assignee:
              pcanal Philippe Canal
              Reporter:
              wlav Wim Lavrijsen
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: