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

Template proxy error when invoking reset on std::shared_ptr

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved (View Workflow)
    • Medium
    • Resolution: Fixed
    • 6.19/01
    • 6.20/00
    • PyROOT
    • None
    • Python2, Centos7

    Description

      The following code leads to an error:

      In [2]: import ROOT                                                                                         In [3]: ROOT.gROOT.ProcessLine('std::shared_ptr<TCanvas> can(new TCanvas());')                              
      In [7]: ROOT.can._get_smart_ptr()                                                                           
      Out[7]: <ROOT.shared_ptr<TCanvas> object at 0x10821c198>
      In [8]: ROOT.can._get_smart_ptr().reset                                                                     
      Out[8]: <ROOT.TemplateProxy at 0x11cc70ef8>
      In [9]: ROOT.can._get_smart_ptr().reset(ROOT.TCanvas())                                                     
      ---------------------------------------------------------------------------
      TypeError                                 Traceback (most recent call last)
      <ipython-input-9-92b0cbd81331> in <module>
      ----> 1 ROOT.can._get_smart_ptr().reset(ROOT.TCanvas())TypeError: can not resolve method template call for 'reset'
      
      

      The issue is in the call to the template proxy of reset.

      In experimental PyROOT, the issue is no longer there.

       

      Attachments

        Activity

          People

            etejedor Enric Tejedor Saavedra
            etejedor Enric Tejedor Saavedra
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: