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

ShortTypes doesn't always strip default stdlib template args

    XMLWordPrintable

Details

    Description

      int err__ = 0;
      std::string demTI = TClassEdit::DemangleTypeIdName(typeid(std::map<int,int>), err__)
      // prints (std::string &) "std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > >"
      TClassEdit::TSplitType splitname(demTI.c_str(), (TClassEdit::EModType)(TClassEdit::kLong64 | TClassEdit::kDropStd) );
      splitname.ShortType(demTI, TClassEdit::kDropStlDefault | TClassEdit::kDropStd);
      demTI
      // prints (std::string &) "map<int,int,less<int>,allocator<pair<int const,int> > >"

      I, and apparently TCling::AutoLoad(type_info&), expect the latter to print "map<int,int>".

      Once fixed, this will remove the dupe rootmap entries (for both expected and unexpectedly long spellings) that I will introduce shortly...

      Attachments

        Activity

          People

            pcanal Philippe Canal
            axel Axel Naumann
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: